Package org.ec4j.core.parser
Enum ErrorEvent.ErrorType
- All Implemented Interfaces:
Serializable,Comparable<ErrorEvent.ErrorType>,java.lang.constant.Constable
- Enclosing class:
ErrorEvent
A way to keep apart various kinds of errors in a type safe way.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFor third parties who may want to report an error not envisaged here -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSyntax errors are such ones that have to do with the.editorconfigfile structure, such a as property without value, or property name not followed by equal sign.static ErrorEvent.ErrorTypeReturns the enum constant of this type with the specified name.static ErrorEvent.ErrorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EXPECTED_END_OF_INPUT
-
EXPECTED_STRING_CHARACTER
-
GLOB_NOT_CLOSED
-
INVALID_GLOB
-
INVALID_PROPERTY_VALUE
-
PROPERTY_ASSIGNMENT_MISSING
-
PROPERTY_VALUE_MISSING
-
UNEXPECTED_END_OF_INPUT
-
OTHER
For third parties who may want to report an error not envisaged here
-
-
Field Details
-
syntaxError
private final boolean syntaxError
-
-
Constructor Details
-
ErrorType
private ErrorType(boolean syntaxError)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isSyntaxError
public boolean isSyntaxError()Syntax errors are such ones that have to do with the.editorconfigfile structure, such a as property without value, or property name not followed by equal sign. Non-syntax errors that may happen with the current implementation are only of two kinds: (i) brokenGlobpattern or (ii) invalid value for the given registeredPropertyType.- Returns:
trueis this is a syntax error;falseotherwise
-