Class PackageSelector.IdentifierParser
java.lang.Object
org.junit.platform.engine.discovery.PackageSelector.IdentifierParser
- All Implemented Interfaces:
DiscoverySelectorIdentifierParser
- Enclosing class:
PackageSelector
@API(status=INTERNAL,
since="1.11")
public static class PackageSelector.IdentifierParser
extends Object
implements DiscoverySelectorIdentifierParser
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.discovery.DiscoverySelectorIdentifierParser
DiscoverySelectorIdentifierParser.Context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the prefix that this parser can handle.parse
(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context context) Parse the suppliedDiscoverySelectorIdentifier
.
-
Constructor Details
-
IdentifierParser
public IdentifierParser()
-
-
Method Details
-
getPrefix
Description copied from interface:DiscoverySelectorIdentifierParser
Get the prefix that this parser can handle.- Specified by:
getPrefix
in interfaceDiscoverySelectorIdentifierParser
- Returns:
- the prefix that this parser can handle; never
null
-
parse
public Optional<PackageSelector> parse(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context context) Description copied from interface:DiscoverySelectorIdentifierParser
Parse the suppliedDiscoverySelectorIdentifier
.The JUnit Platform will only invoke this method if the supplied
DiscoverySelectorIdentifier
has a prefix that matches the value returned byDiscoverySelectorIdentifierParser.getPrefix()
.- Specified by:
parse
in interfaceDiscoverySelectorIdentifierParser
- Parameters:
identifier
- theDiscoverySelectorIdentifier
to parsecontext
- theDiscoverySelectorIdentifierParser.Context
to use for parsing- Returns:
- an
Optional
containing the parsedDiscoverySelector
; nevernull
-