Class ErrorToken

  • All Implemented Interfaces:
    Serializable

    public class ErrorToken
    extends Token
    Error tokens carry an error code and parameters, which can be formatted into an error message via the format strings in validator.protoascii.
    Author:
    nhant01, GeorgeLuo
    See Also:
    Serialized Form
    • Constructor Detail

      • ErrorToken

        public ErrorToken​(dev.amp.validator.ValidatorProtos.ValidationError.Code optCode,
                          List<String> optParams)
                   throws CssValidationException
        Constructor
        Parameters:
        optCode - the optCode value to set
        optParams - the optParams to set
        Throws:
        CssValidationException - Css Validation Exception
    • Method Detail

      • getParams

        public List<String> getParams()
        Getter for error params
        Returns:
        list of params
      • getCode

        public dev.amp.validator.ValidatorProtos.ValidationError.Code getCode()
        Getter for error code
        Returns:
        error code
      • getTokenType

        public TokenType getTokenType()
        Getter for token type.
        Specified by:
        getTokenType in class Token
        Returns:
        returns token type error