@API(status=INTERNAL,
since="5.1")
public final class Script
extends java.lang.Object
DisabledIf
,
EnabledIf
,
ScriptExecutionManager
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
annotationAsString |
private java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType |
static java.lang.String |
BIND_JUNIT_CONFIGURATION_PARAMETER
Accessor for JUnit Platform configuration parameters.
|
static java.lang.String |
BIND_JUNIT_DISPLAY_NAME
Display name of the test or container.
|
static java.lang.String |
BIND_JUNIT_TAGS
Set of all tags assigned to the current extension context.
|
static java.lang.String |
BIND_JUNIT_UNIQUE_ID
Unique ID associated with the current extension context.
|
(package private) static java.lang.String |
BIND_SYSTEM_ENVIRONMENT
Accessor for operating system environment variables.
|
(package private) static java.lang.String |
BIND_SYSTEM_PROPERTY
Accessor for JVM system properties.
|
static java.lang.String |
DEFAULT_SCRIPT_ENGINE_NAME
The script engine name defaults to
Nashorn . |
static java.lang.String |
DEFAULT_SCRIPT_REASON_PATTERN
Default reason message pattern.
|
private java.lang.String |
engine |
private int |
hashCode |
private java.lang.String |
reason |
private static java.lang.String |
REASON_ANNOTATION_PLACEHOLDER
Placeholder name for the
annotation.toString() value. |
private static java.lang.String |
REASON_RESULT_PLACEHOLDER
Placeholder name for String representation of the result object.
|
private static java.lang.String |
REASON_SOURCE_PLACEHOLDER
Placeholder name for the script source.
|
private java.lang.String |
source |
Constructor and Description |
---|
Script(java.lang.annotation.Annotation annotation,
java.lang.String engine,
java.lang.String source,
java.lang.String reason) |
Script(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
java.lang.String annotationAsString,
java.lang.String engine,
java.lang.String source,
java.lang.String reason) |
Modifier and Type | Method and Description |
---|---|
private int |
computeHashCode()
Properties
annotationType and reason are not
included on purpose. |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getAnnotationAsString() |
java.lang.Class<? extends java.lang.annotation.Annotation> |
getAnnotationType() |
java.lang.String |
getEngine() |
java.lang.String |
getReason() |
java.lang.String |
getSource() |
int |
hashCode() |
java.lang.String |
toReasonString(java.lang.String resultAsString) |
public static final java.lang.String DEFAULT_SCRIPT_ENGINE_NAME
Nashorn
.public static final java.lang.String BIND_JUNIT_TAGS
Value type: Set<String>
ExtensionContext.getTags()
,
Constant Field Valuespublic static final java.lang.String BIND_JUNIT_UNIQUE_ID
Value type: String
public static final java.lang.String BIND_JUNIT_DISPLAY_NAME
Value type: String
public static final java.lang.String BIND_JUNIT_CONFIGURATION_PARAMETER
Usage: junitConfigurationParameter.get(key) -> String
static final java.lang.String BIND_SYSTEM_PROPERTY
Usage: systemProperty.get(key) -> String
System.getProperty(String)
,
Constant Field Valuesstatic final java.lang.String BIND_SYSTEM_ENVIRONMENT
Usage: systemEnvironment.get(key) -> String
System.getenv(String)
,
Constant Field Valuespublic static final java.lang.String DEFAULT_SCRIPT_REASON_PATTERN
private static final java.lang.String REASON_ANNOTATION_PLACEHOLDER
annotation.toString()
value.private static final java.lang.String REASON_RESULT_PLACEHOLDER
private static final java.lang.String REASON_SOURCE_PLACEHOLDER
private final java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private final java.lang.String annotationAsString
private final java.lang.String engine
private final java.lang.String source
private final java.lang.String reason
private final int hashCode
public Script(java.lang.annotation.Annotation annotation, java.lang.String engine, java.lang.String source, java.lang.String reason)
public Script(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.String annotationAsString, java.lang.String engine, java.lang.String source, java.lang.String reason)
private int computeHashCode()
annotationType
and reason
are not
included on purpose. This allows more cache hits when using instances
of this class as keys in a hash map.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getAnnotationAsString()
public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
public java.lang.String getEngine()
public java.lang.String getReason()
public java.lang.String getSource()
public java.lang.String toReasonString(java.lang.String resultAsString)
getReason()
with all placeholders
replaced with their current values stored here.