Enum AtmCombo
- java.lang.Object
-
- java.lang.Enum<AtmCombo>
-
- org.checkerframework.framework.util.AtmCombo
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AtmCombo>
public enum AtmCombo extends java.lang.Enum<AtmCombo>
An enum representing the cartesian product of the set of AtmKinds with itself. This represents all pair-wise combinations of AnnotatedTypeMirror subclasses. AtmCombo can be used in a switch to easily (and in a readable fashion) enumerate a subset of Atm pairs to handle. It is also used to execute AtmComboVisitor, which is a visitor of all possible combinations of AnnotatedTypeMirror subclasses.For example:
switch (AtmCombo.valueOf(atm1, atm2)) { case WILDCARD_WILDCARD: case TYPEVAR_TYPEVAR: doSomething(atm1, atm2); break; }
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <RETURN_TYPE,PARAM>
RETURN_TYPEaccept(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM initialParam, AtmComboVisitor<RETURN_TYPE,PARAM> visitor)
Call the visit method that corresponds to the AtmCombo that represents the classes of type1 and type2.static AtmCombo
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AtmCombo
valueOf(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2)
Returns the AtmCombo corresponding to the pair of the classes for the given AnnotatedTypeMirrors.static AtmCombo
valueOf(org.checkerframework.framework.util.AtmKind type1, org.checkerframework.framework.util.AtmKind type2)
Returns the AtmCombo corresponding to the given ATM pair of the given ATMKinds.static AtmCombo[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ARRAY_ARRAY
public static final AtmCombo ARRAY_ARRAY
-
ARRAY_DECLARED
public static final AtmCombo ARRAY_DECLARED
-
ARRAY_EXECUTABLE
public static final AtmCombo ARRAY_EXECUTABLE
-
ARRAY_INTERSECTION
public static final AtmCombo ARRAY_INTERSECTION
-
ARRAY_NONE
public static final AtmCombo ARRAY_NONE
-
ARRAY_NULL
public static final AtmCombo ARRAY_NULL
-
ARRAY_PRIMITIVE
public static final AtmCombo ARRAY_PRIMITIVE
-
ARRAY_UNION
public static final AtmCombo ARRAY_UNION
-
ARRAY_TYPEVAR
public static final AtmCombo ARRAY_TYPEVAR
-
ARRAY_WILDCARD
public static final AtmCombo ARRAY_WILDCARD
-
DECLARED_ARRAY
public static final AtmCombo DECLARED_ARRAY
-
DECLARED_DECLARED
public static final AtmCombo DECLARED_DECLARED
-
DECLARED_EXECUTABLE
public static final AtmCombo DECLARED_EXECUTABLE
-
DECLARED_INTERSECTION
public static final AtmCombo DECLARED_INTERSECTION
-
DECLARED_NONE
public static final AtmCombo DECLARED_NONE
-
DECLARED_NULL
public static final AtmCombo DECLARED_NULL
-
DECLARED_PRIMITIVE
public static final AtmCombo DECLARED_PRIMITIVE
-
DECLARED_TYPEVAR
public static final AtmCombo DECLARED_TYPEVAR
-
DECLARED_UNION
public static final AtmCombo DECLARED_UNION
-
DECLARED_WILDCARD
public static final AtmCombo DECLARED_WILDCARD
-
EXECUTABLE_ARRAY
public static final AtmCombo EXECUTABLE_ARRAY
-
EXECUTABLE_DECLARED
public static final AtmCombo EXECUTABLE_DECLARED
-
EXECUTABLE_EXECUTABLE
public static final AtmCombo EXECUTABLE_EXECUTABLE
-
EXECUTABLE_INTERSECTION
public static final AtmCombo EXECUTABLE_INTERSECTION
-
EXECUTABLE_NONE
public static final AtmCombo EXECUTABLE_NONE
-
EXECUTABLE_NULL
public static final AtmCombo EXECUTABLE_NULL
-
EXECUTABLE_PRIMITIVE
public static final AtmCombo EXECUTABLE_PRIMITIVE
-
EXECUTABLE_TYPEVAR
public static final AtmCombo EXECUTABLE_TYPEVAR
-
EXECUTABLE_UNION
public static final AtmCombo EXECUTABLE_UNION
-
EXECUTABLE_WILDCARD
public static final AtmCombo EXECUTABLE_WILDCARD
-
INTERSECTION_ARRAY
public static final AtmCombo INTERSECTION_ARRAY
-
INTERSECTION_DECLARED
public static final AtmCombo INTERSECTION_DECLARED
-
INTERSECTION_EXECUTABLE
public static final AtmCombo INTERSECTION_EXECUTABLE
-
INTERSECTION_INTERSECTION
public static final AtmCombo INTERSECTION_INTERSECTION
-
INTERSECTION_NONE
public static final AtmCombo INTERSECTION_NONE
-
INTERSECTION_NULL
public static final AtmCombo INTERSECTION_NULL
-
INTERSECTION_PRIMITIVE
public static final AtmCombo INTERSECTION_PRIMITIVE
-
INTERSECTION_TYPEVAR
public static final AtmCombo INTERSECTION_TYPEVAR
-
INTERSECTION_UNION
public static final AtmCombo INTERSECTION_UNION
-
INTERSECTION_WILDCARD
public static final AtmCombo INTERSECTION_WILDCARD
-
NONE_ARRAY
public static final AtmCombo NONE_ARRAY
-
NONE_DECLARED
public static final AtmCombo NONE_DECLARED
-
NONE_EXECUTABLE
public static final AtmCombo NONE_EXECUTABLE
-
NONE_INTERSECTION
public static final AtmCombo NONE_INTERSECTION
-
NONE_NONE
public static final AtmCombo NONE_NONE
-
NONE_NULL
public static final AtmCombo NONE_NULL
-
NONE_PRIMITIVE
public static final AtmCombo NONE_PRIMITIVE
-
NONE_TYPEVAR
public static final AtmCombo NONE_TYPEVAR
-
NONE_UNION
public static final AtmCombo NONE_UNION
-
NONE_WILDCARD
public static final AtmCombo NONE_WILDCARD
-
NULL_ARRAY
public static final AtmCombo NULL_ARRAY
-
NULL_DECLARED
public static final AtmCombo NULL_DECLARED
-
NULL_EXECUTABLE
public static final AtmCombo NULL_EXECUTABLE
-
NULL_INTERSECTION
public static final AtmCombo NULL_INTERSECTION
-
NULL_NONE
public static final AtmCombo NULL_NONE
-
NULL_NULL
public static final AtmCombo NULL_NULL
-
NULL_PRIMITIVE
public static final AtmCombo NULL_PRIMITIVE
-
NULL_TYPEVAR
public static final AtmCombo NULL_TYPEVAR
-
NULL_UNION
public static final AtmCombo NULL_UNION
-
NULL_WILDCARD
public static final AtmCombo NULL_WILDCARD
-
PRIMITIVE_ARRAY
public static final AtmCombo PRIMITIVE_ARRAY
-
PRIMITIVE_DECLARED
public static final AtmCombo PRIMITIVE_DECLARED
-
PRIMITIVE_EXECUTABLE
public static final AtmCombo PRIMITIVE_EXECUTABLE
-
PRIMITIVE_INTERSECTION
public static final AtmCombo PRIMITIVE_INTERSECTION
-
PRIMITIVE_NONE
public static final AtmCombo PRIMITIVE_NONE
-
PRIMITIVE_NULL
public static final AtmCombo PRIMITIVE_NULL
-
PRIMITIVE_PRIMITIVE
public static final AtmCombo PRIMITIVE_PRIMITIVE
-
PRIMITIVE_TYPEVAR
public static final AtmCombo PRIMITIVE_TYPEVAR
-
PRIMITIVE_UNION
public static final AtmCombo PRIMITIVE_UNION
-
PRIMITIVE_WILDCARD
public static final AtmCombo PRIMITIVE_WILDCARD
-
TYPEVAR_ARRAY
public static final AtmCombo TYPEVAR_ARRAY
-
TYPEVAR_DECLARED
public static final AtmCombo TYPEVAR_DECLARED
-
TYPEVAR_EXECUTABLE
public static final AtmCombo TYPEVAR_EXECUTABLE
-
TYPEVAR_INTERSECTION
public static final AtmCombo TYPEVAR_INTERSECTION
-
TYPEVAR_NONE
public static final AtmCombo TYPEVAR_NONE
-
TYPEVAR_NULL
public static final AtmCombo TYPEVAR_NULL
-
TYPEVAR_PRIMITIVE
public static final AtmCombo TYPEVAR_PRIMITIVE
-
TYPEVAR_TYPEVAR
public static final AtmCombo TYPEVAR_TYPEVAR
-
TYPEVAR_UNION
public static final AtmCombo TYPEVAR_UNION
-
TYPEVAR_WILDCARD
public static final AtmCombo TYPEVAR_WILDCARD
-
UNION_ARRAY
public static final AtmCombo UNION_ARRAY
-
UNION_DECLARED
public static final AtmCombo UNION_DECLARED
-
UNION_EXECUTABLE
public static final AtmCombo UNION_EXECUTABLE
-
UNION_INTERSECTION
public static final AtmCombo UNION_INTERSECTION
-
UNION_NONE
public static final AtmCombo UNION_NONE
-
UNION_NULL
public static final AtmCombo UNION_NULL
-
UNION_PRIMITIVE
public static final AtmCombo UNION_PRIMITIVE
-
UNION_TYPEVAR
public static final AtmCombo UNION_TYPEVAR
-
UNION_UNION
public static final AtmCombo UNION_UNION
-
UNION_WILDCARD
public static final AtmCombo UNION_WILDCARD
-
WILDCARD_ARRAY
public static final AtmCombo WILDCARD_ARRAY
-
WILDCARD_DECLARED
public static final AtmCombo WILDCARD_DECLARED
-
WILDCARD_EXECUTABLE
public static final AtmCombo WILDCARD_EXECUTABLE
-
WILDCARD_INTERSECTION
public static final AtmCombo WILDCARD_INTERSECTION
-
WILDCARD_NONE
public static final AtmCombo WILDCARD_NONE
-
WILDCARD_NULL
public static final AtmCombo WILDCARD_NULL
-
WILDCARD_PRIMITIVE
public static final AtmCombo WILDCARD_PRIMITIVE
-
WILDCARD_TYPEVAR
public static final AtmCombo WILDCARD_TYPEVAR
-
WILDCARD_UNION
public static final AtmCombo WILDCARD_UNION
-
WILDCARD_WILDCARD
public static final AtmCombo WILDCARD_WILDCARD
-
-
Method Detail
-
values
public static AtmCombo[] 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 (AtmCombo c : AtmCombo.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AtmCombo valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
valueOf
public static AtmCombo valueOf(org.checkerframework.framework.util.AtmKind type1, org.checkerframework.framework.util.AtmKind type2)
Returns the AtmCombo corresponding to the given ATM pair of the given ATMKinds. e.g. (AtmKind.NULL, AtmKind.EXECUTABLE) => AtmCombo.NULL_EXECUTABLE.- Returns:
- the AtmCombo corresponding to the given ATM pair of the given ATMKinds. e.g. (AtmKind.NULL, AtmKind.EXECUTABLE) => AtmCombo.NULL_EXECUTABLE
-
valueOf
public static AtmCombo valueOf(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2)
Returns the AtmCombo corresponding to the pair of the classes for the given AnnotatedTypeMirrors. e.g. (AnnotatedPrimitiveType, AnnotatedDeclaredType) => AtmCombo.PRIMITIVE_DECLARED- Returns:
- the AtmCombo corresponding to the pair of the classes for the given AnnotatedTypeMirrors
-
accept
public static <RETURN_TYPE,PARAM> RETURN_TYPE accept(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM initialParam, AtmComboVisitor<RETURN_TYPE,PARAM> visitor)
Call the visit method that corresponds to the AtmCombo that represents the classes of type1 and type2. That is, get the combo for type1 and type 2, use it to identify the correct visitor method, and call that method with type1, type2, and initialParam as arguments to the visit method.- Type Parameters:
RETURN_TYPE
- the return type of the visitor's visit methodsPARAM
- the parameter type of the visitor's visit methods- Parameters:
type1
- first argument to the called visit methodtype2
- second argument to the called visit methodinitialParam
- the parameter passed to the called visit methodvisitor
- the visitor that is visiting the given types- Returns:
- the return value of the visit method called
-
-