Package org.junit.platform.engine
Class UniqueIdFormat
java.lang.Object
org.junit.platform.engine.UniqueIdFormat
- All Implemented Interfaces:
Serializable
Used to
parse(java.lang.String)
a UniqueId
from a string representation
or to format(org.junit.platform.engine.UniqueId)
a UniqueId
into a string representation.- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char
private static final UniqueIdFormat
private final char
private final char
private final Pattern
private static final long
private final char
-
Constructor Summary
ConstructorsConstructorDescriptionUniqueIdFormat
(char openSegment, char typeValueSeparator, char closeSegment, char segmentDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
checkAllowed
(String typeOrValue) private void
checkDoesNotContain
(String typeOrValue, char forbiddenCharacter) private UniqueId.Segment
createSegment
(String segmentString) private static String
private String
describe
(UniqueId.Segment segment) private static String
encode
(char c) private String
(package private) String
Format and return the string representation of the suppliedUniqueId
.(package private) static UniqueIdFormat
(package private) UniqueId
Parse aUniqueId
from the supplied string representation.private static String
quote
(char c)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
defaultFormat
-
openSegment
private final char openSegment -
closeSegment
private final char closeSegment -
segmentDelimiter
private final char segmentDelimiter -
typeValueSeparator
private final char typeValueSeparator -
segmentPattern
-
encodedCharacterMap
-
-
Constructor Details
-
UniqueIdFormat
UniqueIdFormat(char openSegment, char typeValueSeparator, char closeSegment, char segmentDelimiter)
-
-
Method Details
-
getDefault
-
quote
-
encode
-
parse
Parse aUniqueId
from the supplied string representation.- Returns:
- a properly constructed
UniqueId
- Throws:
org.junit.platform.commons.JUnitException
- if the string cannot be parsed
-
createSegment
private UniqueId.Segment createSegment(String segmentString) throws org.junit.platform.commons.JUnitException - Throws:
org.junit.platform.commons.JUnitException
-
checkAllowed
-
checkDoesNotContain
-
format
Format and return the string representation of the suppliedUniqueId
. -
describe
-
encode
-
decode
-