TestSource with
an optional file position.
If a Java Class reference is provided, the ClassSource
will contain that Class and its class name accordingly. If a class
name is provided, the ClassSource will contain the class name and
will only attempt to lazily load the Class if getJavaClass()
is invoked.
In this context, Java Class means anything that can be referenced
as a Class on the JVM — for example, classes from other JVM
languages such Groovy, Scala, etc.
org.junit.platform.engine.discovery.ClassSelector
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private final String | |
| private final @Nullable FilePosition | |
| private @Nullable Class | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public static ClassSource | |
| public static ClassSource | from(String
the class name; must not be className, @Nullable FilePosition null or blankthe position in the source file; may be filePosition)nullCreate a new |
| public static ClassSource | |
| public static ClassSource | from(Class<?>
the Java class; must not be javaClass, FilePosition nullthe position in the Java source file; may be filePosition)nullCreate a new |
| public static ClassSource | |
| public String | |
| public Class | |
| public Optional | |
| public int | |
| public String |
| CLASS_SCHEME | back to summary |
|---|---|
public static final String CLASS_SCHEME
| |
| className | back to summary |
|---|---|
| private final String className | |
| filePosition | back to summary |
|---|---|
| private final @Nullable FilePosition filePosition | |
| javaClass | back to summary |
|---|---|
| private @Nullable Class<?> javaClass | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| ClassSource | back to summary |
|---|---|
| private ClassSource(String className) | |
| ClassSource | back to summary |
|---|---|
| private ClassSource(String className, @Nullable FilePosition filePosition) | |
| ClassSource | back to summary |
|---|---|
| private ClassSource(Class<?> javaClass) | |
| ClassSource | back to summary |
|---|---|
| private ClassSource(Class<?> javaClass, @Nullable FilePosition filePosition) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| from | back to summary |
|---|---|
| public static ClassSource from(String className) Create a new
| |
| from | back to summary |
|---|---|
| public static ClassSource from(String className, @Nullable FilePosition filePosition) Create a new
| |
| from | back to summary |
|---|---|
| public static ClassSource from(Class<?> javaClass) Create a new
| |
| from | back to summary |
|---|---|
| public static ClassSource from(Class<?> javaClass, FilePosition filePosition) Create a new
| |
| from | back to summary |
|---|---|
| public static ClassSource from(URI uri) Create a new URIs should be formatted as
| |
| getClassName | back to summary |
|---|---|
| public String getClassName() Get the class name of this source.
| |
| getJavaClass | back to summary |
|---|---|
| public Class Get the Java class of this source. If the
| |
| getPosition | back to summary |
|---|---|
| public Optional Get the position in the source file for the associated class, if available.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |