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 CSSParseError
createBrowserCompliantSkip(ParseException ex, Token aFromToken, Token aToToken)
static CSSParseError
createDeprecatedProperty(Token aPrefixToken, Token aIdentifierToken)
static CSSParseError
createIllegalCharacter(char cIllegalChar)
static CSSParseError
createUnexpectedRule(Token aCurrentToken, String sRule, String sMsg)
String
getErrorMessage()
String
getExpectedTokens()
ReadOnlyToken
getFirstSkippedToken()
ReadOnlyToken
getLastSkippedToken()
ReadOnlyToken
getLastValidToken()
String
toString()
-
-
-
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
LoggingCSSParseErrorHandler
as a convenience method. Neithernull
nor 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)
-
-