Class CSSParseError
- java.lang.Object
-
- com.helger.css.reader.errorhandler.CSSParseError
-
@Immutable public class CSSParseError extends Object
This item contains a single CSSparsing error. It is used e.g. in theCollectingCSSParseErrorHandler.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description CSSParseError(Token aLastValidToken, int[][] aExpectedTokenSequencesVal, String[] aTokenImageVal, Token aLastSkippedToken)CSSParseError(String sErrorMsg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CSSParseErrorcreateBrowserCompliantSkip(ParseException ex, Token aFromToken, Token aToToken)static CSSParseErrorcreateDeprecatedProperty(Token aPrefixToken, Token aIdentifierToken)static CSSParseErrorcreateIllegalCharacter(char cIllegalChar)static CSSParseErrorcreateUnexpectedRule(Token aCurrentToken, String sRule, String sMsg)StringgetErrorMessage()StringgetExpectedTokens()ReadOnlyTokengetFirstSkippedToken()ReadOnlyTokengetLastSkippedToken()ReadOnlyTokengetLastValidToken()StringtoString()
-
-
-
Method Detail
-
getLastValidToken
@Nullable public ReadOnlyToken getLastValidToken()
- Returns:
- The last valid token read. May be
null.
-
getExpectedTokens
@Nullable public String getExpectedTokens()
- Returns:
- The expected tokens as a string representation. May be
null.
-
getFirstSkippedToken
@Nullable public ReadOnlyToken getFirstSkippedToken()
- Returns:
- The first token that was skipped. That can be used to identify the
start position of the error. May be
null.
-
getLastSkippedToken
@Nullable public ReadOnlyToken getLastSkippedToken()
- Returns:
- The last token that was skipped. That can be used to identify the
end position of the error. May be
null.
-
getErrorMessage
@Nonnull @Nonempty public String getErrorMessage()
- Returns:
- The error message created by
LoggingCSSParseErrorHandleras a convenience method. Neithernullnor empty.
-
createUnexpectedRule
@Nonnull public static CSSParseError createUnexpectedRule(@Nonnull Token aCurrentToken, @Nonnull @Nonempty String sRule, @Nonnull @Nonempty String sMsg)
-
createDeprecatedProperty
@Nonnull public static CSSParseError createDeprecatedProperty(@Nonnull Token aPrefixToken, @Nonnull Token aIdentifierToken)
-
createBrowserCompliantSkip
@Nonnull public static CSSParseError createBrowserCompliantSkip(@Nullable ParseException ex, @Nonnull Token aFromToken, @Nonnull Token aToToken)
-
createIllegalCharacter
@Nonnull public static CSSParseError createIllegalCharacter(char cIllegalChar)
-
-