Module org.junit.platform.engine
Class MethodSelector.IdentifierParser
java.lang.Object
org.junit.platform.engine.discovery.MethodSelector.IdentifierParser
- All Implemented Interfaces:
DiscoverySelectorIdentifierParser
- Enclosing class:
MethodSelector
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.discovery.DiscoverySelectorIdentifierParser
DiscoverySelectorIdentifierParser.Context
-
Constructor Summary
-
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<MethodSelector> 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
-