Package javax.annotation.meta
Enum When
- java.lang.Object
-
- java.lang.Enum<When>
-
- javax.annotation.meta.When
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<When>
public enum When extends java.lang.Enum<When>
Used to describe the relationship between a qualifier T and the set of values S possible on an annotated element. In particular, an issues should be reported if an ALWAYS or MAYBE value is used where a NEVER value is required, or if a NEVER or MAYBE value is used where an ALWAYS value is required.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static When
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static When[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALWAYS
public static final When ALWAYS
S is a subset of T
-
UNKNOWN
public static final When UNKNOWN
nothing definitive is known about the relation between S and T
-
MAYBE
public static final When MAYBE
S intersection T is non empty and S - T is nonempty
-
NEVER
public static final When NEVER
S intersection T is empty
-
-
Method Detail
-
values
public static When[] 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 (When c : When.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static When 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
-
-