Class ClasspathRootSelector.IdentifierParser
- java.lang.Object
-
- org.junit.platform.engine.discovery.ClasspathRootSelector.IdentifierParser
-
- All Implemented Interfaces:
DiscoverySelectorIdentifierParser
- Enclosing class:
- ClasspathRootSelector
@API(status=INTERNAL, since="1.11") public static class ClasspathRootSelector.IdentifierParser extends java.lang.Object implements DiscoverySelectorIdentifierParser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.discovery.DiscoverySelectorIdentifierParser
DiscoverySelectorIdentifierParser.Context
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringPREFIX
-
Constructor Summary
Constructors Constructor Description IdentifierParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPrefix()Get the prefix that this parser supports.java.util.Optional<ClasspathRootSelector>parse(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context context)Parse the suppliedDiscoverySelectorIdentifier.
-
-
-
Field Detail
-
PREFIX
private static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix()
Description copied from interface:DiscoverySelectorIdentifierParserGet the prefix that this parser supports.- Specified by:
getPrefixin interfaceDiscoverySelectorIdentifierParser- Returns:
- the prefix that this parser supports; never
nullor blank
-
parse
public java.util.Optional<ClasspathRootSelector> parse(DiscoverySelectorIdentifier identifier, DiscoverySelectorIdentifierParser.Context context)
Description copied from interface:DiscoverySelectorIdentifierParserParse the suppliedDiscoverySelectorIdentifier.The JUnit Platform will only invoke this method if the supplied
DiscoverySelectorIdentifierhas a prefix that matches the value returned byDiscoverySelectorIdentifierParser.getPrefix().- Specified by:
parsein interfaceDiscoverySelectorIdentifierParser- Parameters:
identifier- theDiscoverySelectorIdentifierto parsecontext- theDiscoverySelectorIdentifierParser.Contextto use for parsing- Returns:
- an
Optionalcontaining the parsedDiscoverySelector; nevernullbut potentially empty
-
-