Class AbstractToken<TokenType>

  • Type Parameters:
    TokenType - the type of token represented
    All Implemented Interfaces:
    Token<TokenType>

    public abstract class AbstractToken<TokenType>
    extends Object
    implements Token<TokenType>
    Base abstract implementation of Token.
    • Field Detail

      • wrappedToken

        private TokenType wrappedToken
        The wrapped token object instance.
    • Constructor Detail

      • AbstractToken

        protected AbstractToken​(@Nonnull
                                TokenType token)
        Constructor.
        Parameters:
        token - the wrapped token instance
    • Method Detail

      • getWrappedToken

        @Nonnull
        public TokenType getWrappedToken()
        Get the underlying data structure of this token.
        Specified by:
        getWrappedToken in interface Token<TokenType>
        Returns:
        the underlying token object
      • setValidationStatus

        public void setValidationStatus​(@Nonnull
                                        Token.ValidationStatus status)
        Get the token validation status.
        Parameters:
        status - the new token validation status