Class ConfigToken
- java.lang.Object
-
- net.morimekta.util.CharSlice
-
- net.morimekta.util.lexer.Token<ConfigTokenType>
-
- net.morimekta.providence.config.parser.ConfigToken
-
- All Implemented Interfaces:
java.lang.CharSequence,java.lang.Comparable<net.morimekta.util.CharSlice>,net.morimekta.util.Stringable
public class ConfigToken extends net.morimekta.util.lexer.Token<ConfigTokenType>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringB64static java.lang.StringHEXstatic charkEntrySepstatic charkFieldValueSepstatic charkIdentifierSepstatic charkKeyValueSepstatic charkLineSepstatic charkListEndstatic charkListStartstatic charkMessageEndstatic charkMessageStartstatic charkParamsEndstatic charkParamsStart
-
Constructor Summary
Constructors Constructor Description ConfigToken(char[] fb, int off, int len, ConfigTokenType type, int lineNo, int linePos)Create a slice instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDoubleQualifiedIdentifier()booleanisIdentifier()booleanisInteger()booleanisQualifiedIdentifier()booleanisReal()booleanisReferenceIdentifier()booleanisString()-
Methods inherited from class net.morimekta.util.lexer.Token
decodeString, equals, hashCode, isSymbol, line, lineNo, linePos, type
-
Methods inherited from class net.morimekta.util.CharSlice
asString, charAt, compareTo, contains, contains, containsAny, length, offset, parseDouble, parseInteger, strEquals, strEquals, subSequence, substring, toString
-
-
-
-
Field Detail
-
kMessageStart
public static final char kMessageStart
- See Also:
- Constant Field Values
-
kMessageEnd
public static final char kMessageEnd
- See Also:
- Constant Field Values
-
kKeyValueSep
public static final char kKeyValueSep
- See Also:
- Constant Field Values
-
kFieldValueSep
public static final char kFieldValueSep
- See Also:
- Constant Field Values
-
kParamsStart
public static final char kParamsStart
- See Also:
- Constant Field Values
-
kParamsEnd
public static final char kParamsEnd
- See Also:
- Constant Field Values
-
kListStart
public static final char kListStart
- See Also:
- Constant Field Values
-
kListEnd
public static final char kListEnd
- See Also:
- Constant Field Values
-
kEntrySep
public static final char kEntrySep
- See Also:
- Constant Field Values
-
kLineSep
public static final char kLineSep
- See Also:
- Constant Field Values
-
kIdentifierSep
public static final char kIdentifierSep
- See Also:
- Constant Field Values
-
B64
public static final java.lang.String B64
- See Also:
- Constant Field Values
-
HEX
public static final java.lang.String HEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfigToken
public ConfigToken(char[] fb, int off, int len, @Nonnull ConfigTokenType type, int lineNo, int linePos)Create a slice instance. The slice is only meant to be internal state immutable, and not representing an immutable byte content.- Parameters:
fb- The buffer to wrap.off- The start offset to wrap.len- The length to represent.type- The token type represented.lineNo- The current line number.linePos- The current line position.
-
-
Method Detail
-
isString
public boolean isString()
-
isIdentifier
public boolean isIdentifier()
-
isDoubleQualifiedIdentifier
public boolean isDoubleQualifiedIdentifier()
-
isQualifiedIdentifier
public boolean isQualifiedIdentifier()
-
isReferenceIdentifier
public boolean isReferenceIdentifier()
-
isInteger
public boolean isInteger()
-
isReal
public boolean isReal()
-
-