Enum ValidationError.Category
- java.lang.Object
-
- java.lang.Enum<ValidationError.Category>
-
- com.tonic.analysis.source.ast.validation.ValidationError.Category
-
- All Implemented Interfaces:
Serializable,Comparable<ValidationError.Category>
- Enclosing class:
- ValidationError
public static enum ValidationError.Category extends Enum<ValidationError.Category>
The aspect of the AST a validation issue concerns.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSISTENCYTwo parts of the tree that should agree do not, such as a node's cached information contradicting its actual position.NULL_CHECKA child the node requires is missing, so something downstream would dereference null.SEMANTICThe tree is well formed but the code it describes is not meaningful Java, such as a try with neither a catch nor a finally.STRUCTURALThe shape of the tree itself is wrong, independent of what the code means.TYPEThe types an expression combines do not fit, such as comparing two operands that are not comparable.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValidationError.CategoryvalueOf(String name)Returns the enum constant of this type with the specified name.static ValidationError.Category[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRUCTURAL
public static final ValidationError.Category STRUCTURAL
The shape of the tree itself is wrong, independent of what the code means.
-
TYPE
public static final ValidationError.Category TYPE
The types an expression combines do not fit, such as comparing two operands that are not comparable.
-
NULL_CHECK
public static final ValidationError.Category NULL_CHECK
A child the node requires is missing, so something downstream would dereference null.
-
SEMANTIC
public static final ValidationError.Category SEMANTIC
The tree is well formed but the code it describes is not meaningful Java, such as a try with neither a catch nor a finally.
-
CONSISTENCY
public static final ValidationError.Category CONSISTENCY
Two parts of the tree that should agree do not, such as a node's cached information contradicting its actual position.
-
-
Method Detail
-
values
public static ValidationError.Category[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValidationError.Category c : ValidationError.Category.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidationError.Category valueOf(String name)
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
-
-