javax.annotation.meta
Class When
public
class
When
extends 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.
Field Summary |
static When | ALWAYS S is a subset of T |
static When | MAYBE S intersection T is non empty and S - T is nonempty |
static When | NEVER S intersection T is empty |
static When | UNKNOWN nothing definitive is known about the relation between S and T |
static List<When> | VALUES An immutable list containing the values comprising this enum class in the order they're declared. |
Method Summary |
List<When> | family() Returns an immutable list containing the values comprising this enum class in the order they're declared. |
static When | valueOf(String name) Static factory to return the enum constant pertaining to the given string name. |
public static final
When ALWAYS
S is a subset of T
public static final
When MAYBE
S intersection T is non empty and S - T is nonempty
public static final
When NEVER
S intersection T is empty
public static final
When UNKNOWN
nothing definitive is known about the relation between S and T
public static final List<
When> VALUES
An immutable list containing the values comprising this enum class in the order they're declared. This field may be used to iterate over the constants as follows:
for(When c : When.VALUES)
System.out.println(c);
public final List<
When> family()
Returns an immutable list containing the values comprising this enum class in the order they're declared. This instance method simply returns
VALUES
. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to
VALUES
.
Returns: an immutable list containing the values comprising this enum class, in the order they're declared.
public static final
When valueOf(String name)
Static factory to return the enum constant pertaining to the given string name. The string must match exactly an identifier used to declare an enum constant in this type.
Throws: IllegalArgumentException if this enum class has no constant with the specified name.
Copyright © {inceptionYear}-2008 null. All Rights Reserved.