DiscoverySelector that selects a nested Class
or class name enclosed in other classes so that
TestEngines can discover
tests or containers based on classes.
If Java Class references are provided for the nested class or
the enclosing classes, the selector will return those classes and their class
names accordingly. If class names are provided, the selector will only attempt
to lazily load classes if getEnclosingClasses() or
getNestedClass() 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.
DiscoverySelectors#selectNestedClass(List, Class), DiscoverySelectors#selectNestedClass(List, String), org.junit.platform.engine.support.descriptor.ClassSource , ClassSelector
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final @Nullable ClassLoader | |
| private final List | |
| private final ClassSelector |
| Access | Constructor and Description |
|---|---|
| pack-priv | NestedClassSelector(@Nullable ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName)
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public @Nullable ClassLoader | Returns: theClassLoader; potentially nullGet the |
| public List | |
| public List | |
| public Class | |
| public String | |
| public int | |
| public Optional | toIdentifier()
Overrides default org. Return the identifier of this selector. |
| public String |
| classLoader | back to summary |
|---|---|
| private final @Nullable ClassLoader classLoader | |
| enclosingClassSelectors | back to summary |
|---|---|
| private final List<ClassSelector> enclosingClassSelectors | |
| nestedClassSelector | back to summary |
|---|---|
| private final ClassSelector nestedClassSelector | |
| NestedClassSelector | back to summary |
|---|---|
| pack-priv NestedClassSelector(@Nullable ClassLoader classLoader, List<String> enclosingClassNames, String nestedClassName) | |
| NestedClassSelector | back to summary |
|---|---|
| pack-priv NestedClassSelector(List<Class<?>> enclosingClasses, Class<?> nestedClass) | |
| 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.
| |
| getClassLoader | back to summary |
|---|---|
| public @Nullable ClassLoader getClassLoader() Get the
| |
| getEnclosingClasses | back to summary |
|---|---|
| public List Get the list of If the | |
| getEnclosingClassNames | back to summary |
|---|---|
| public List Get the names of the classes enclosing the selected nested class. | |
| getNestedClass | back to summary |
|---|---|
| public Class Get the selected nested If the | |
| getNestedClassName | back to summary |
|---|---|
| public String getNestedClassName() Get the name of the selected nested class. | |
| 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
| |
| toIdentifier | back to summary |
|---|---|
| public Optional Overrides default org. Doc from org. Return the identifier of this selector. The returned identifier must be parsable by a corresponding
The default implementation returns
| |
| 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-
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getPrefix()
Implements org. Get the prefix that this parser supports. |
| public Optional | parse(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.
Implements org. Parse the supplied |
| PREFIX | back to summary |
|---|---|
| pack-priv static final String PREFIX | |
| IdentifierParser | back to summary |
|---|---|
| public IdentifierParser() | |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() Implements org. Doc from org. Get the prefix that this parser supports.
| |
| parse | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Parse the supplied The JUnit Platform will only invoke this method if the supplied
| |