Top Description Inners Methods
org.junit.platform.engine.discovery

public Interface DiscoverySelectorIdentifierParser

Known Direct Implementers
org.junit.platform.engine.discovery.FileSelector.IdentifierParser, org.junit.platform.engine.discovery.IterationSelector.IdentifierParser, org.junit.platform.engine.discovery.MethodSelector.IdentifierParser, org.junit.platform.engine.discovery.ModuleSelector.IdentifierParser, org.junit.platform.engine.discovery.NestedClassSelector.IdentifierParser, org.junit.platform.engine.discovery.NestedMethodSelector.IdentifierParser, org.junit.platform.engine.discovery.PackageSelector.IdentifierParser, org.junit.platform.engine.discovery.UniqueIdSelector.IdentifierParser, org.junit.platform.engine.discovery.UriSelector.IdentifierParser, org.junit.platform.engine.discovery.ClasspathResourceSelector.IdentifierParser, org.junit.platform.engine.discovery.ClasspathRootSelector.IdentifierParser, org.junit.platform.engine.discovery.ClassSelector.IdentifierParser, org.junit.platform.engine.discovery.DirectorySelector.IdentifierParser
Annotations
@API
status:MAINTAINED
since:1.13.3
Static Imports
org.apiguardian.api.API.Status.MAINTAINED

Parser for a DiscoverySelectorIdentifier with a specific prefix.

Implementations of this interface can be registered using the Java service loader mechanism to extend the set of supported prefixes for DiscoverySelectorIdentifiers.

Since
1.11
See Also
DiscoverySelectors#parse(String)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the prefix that this parser supports; never null or blank
getPrefix
()

Get the prefix that this parser supports.

public Optional<? extends DiscoverySelector>

Returns:

an Optional containing the parsed DiscoverySelector; never null but potentially empty
parse
(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context
the Context to use for parsing
context
)

Parse the supplied DiscoverySelectorIdentifier.

Method Detail

getPrefixback to summary
public String getPrefix()

Get the prefix that this parser supports.

Returns:String

the prefix that this parser supports; never null or blank

parseback to summary
public Optional<? extends DiscoverySelector> parse(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context context)

Parse the supplied DiscoverySelectorIdentifier.

The JUnit Platform will only invoke this method if the supplied DiscoverySelectorIdentifier has a prefix that matches the value returned by getPrefix().

Parameters
identifier:DiscoverySelectorIdentifier

the DiscoverySelectorIdentifier to parse

context:DiscoverySelectorIdentifierParser.Context

the Context to use for parsing

Returns:Optional<? extends DiscoverySelector>

an Optional containing the parsed DiscoverySelector; never null but potentially empty

org.junit.platform.engine.discovery back to summary

public Interface DiscoverySelectorIdentifierParser.Context


Context for parsing DiscoverySelectorIdentifiers.

Method Summary

Modifier and TypeMethod and Description
public Optional<? extends DiscoverySelector>
parse(String selector)

Parse the supplied selector.

Method Detail

parseback to summary
public Optional<? extends DiscoverySelector> parse(String selector)

Parse the supplied selector.

This method is intended to be used by implementations of DiscoverySelectorIdentifierParser#parse for selectors that contain other selectors.