Class Token

    • Constructor Detail

      • Token

        protected Token​(String tokenString)
        Constructs a Token instance using the given string representation of the token.
        Parameters:
        tokenString - the string representation of the token.
    • Method Detail

      • toString

        public String toString()
        Returns the string representation of this token. If an XML document parse resulted in n tokens, then concatenating the toString() of each of these tokens in the give order will result in the creation of the exact same XML document. If the token was deleted, an empty string is returned.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this token, or an empty string if the token has been marked deleted.
      • getTokenString

        protected String getTokenString()
        Returns the string representation of the token
        Returns:
      • setTokenString

        protected void setTokenString​(String tokenString)
        Allows the specialized tokens to manipulate the token string as needed.
        Parameters:
        tokenString - the string representation of the token that will be set from this point onwards.
      • toDebugString

        public String toDebugString()
        Returns a string representation of this token including any specific token related details along with it.
        Returns:
        a string representation of this token including debug information
      • getTokenTypeString

        protected abstract String getTokenTypeString()