Class GQLToken
- java.lang.Object
-
- net.morimekta.util.CharSlice
-
- net.morimekta.util.lexer.Token<GQLTokenType>
-
- net.morimekta.providence.graphql.parser.GQLToken
-
- All Implemented Interfaces:
java.lang.CharSequence,java.lang.Comparable<net.morimekta.util.CharSlice>,net.morimekta.util.Stringable
public class GQLToken extends net.morimekta.util.lexer.Token<GQLTokenType>
-
-
Field Summary
Fields Modifier and Type Field Description static charkDirectivestatic charkEntrySepstatic charkFieldValueSepstatic charkKeyValueSepstatic charkListEndstatic charkListStartstatic charkMessageEndstatic charkMessageStartstatic charkParamsEndstatic charkParamsStartstatic charkVariable
-
Constructor Summary
Constructors Constructor Description GQLToken(char[] fb, int off, int len, GQLTokenType type, int lineNo, int linePos)Create a slice instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDirectve()booleanisIdentifier()booleanisString()booleanisVariable()-
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
-
kDirective
public static final char kDirective
- See Also:
- Constant Field Values
-
kVariable
public static final char kVariable
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GQLToken
public GQLToken(char[] fb, int off, int len, @Nonnull GQLTokenType 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.
-
-