Class ThriftToken

  • All Implemented Interfaces:
    java.lang.CharSequence, java.lang.Comparable<net.morimekta.util.CharSlice>, net.morimekta.util.Stringable

    public class ThriftToken
    extends net.morimekta.util.lexer.Token<ThriftTokenType>
    • Constructor Detail

      • ThriftToken

        public ThriftToken​(char[] fb,
                           int off,
                           int len,
                           @Nonnull
                           ThriftTokenType 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

      • isSymbol

        public boolean isSymbol​(char symbol)
        Overrides:
        isSymbol in class net.morimekta.util.lexer.Token<ThriftTokenType>
      • parseDocumentation

        public java.lang.String parseDocumentation()
        Parse token content as documentation.
        Returns:
        The documentation string.
      • isFieldId

        public boolean isFieldId()
      • isEnumValueId

        public boolean isEnumValueId()
      • isInteger

        public boolean isInteger()
      • isReal

        public boolean isReal()
      • isIdentifier

        public boolean isIdentifier()
      • isQualifiedIdentifier

        public boolean isQualifiedIdentifier()
      • isDoubleQualifiedIdentifier

        public boolean isDoubleQualifiedIdentifier()
      • isReferenceIdentifier

        public boolean isReferenceIdentifier()