Enum LocationReferenceOption
- java.lang.Object
-
- java.lang.Enum<LocationReferenceOption>
-
- com.thomasjensen.checkstyle.addons.checks.misc.LocationReferenceOption
-
- All Implemented Interfaces:
Serializable
,Comparable<LocationReferenceOption>
public enum LocationReferenceOption extends Enum<LocationReferenceOption>
Represents the possible locations that an instance of theLocationReferenceCheck
may refer to.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ClassObject
the current type, as a staticClass
object (e.g.FullClass
the fully qualified name of the current type, as aString
literalMethod
the name of the current method, as aString
literalSimpleClass
the simple name of the current type, as aString
literal
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocationReferenceOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static LocationReferenceOption
valueOfIgnoreCase(String pValue)
Variant ofEnum.valueOf(java.lang.Class<T>, java.lang.String)
that ignores value case.static LocationReferenceOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Method
public static final LocationReferenceOption Method
the name of the current method, as aString
literal
-
SimpleClass
public static final LocationReferenceOption SimpleClass
the simple name of the current type, as aString
literal
-
FullClass
public static final LocationReferenceOption FullClass
the fully qualified name of the current type, as aString
literal
-
ClassObject
public static final LocationReferenceOption ClassObject
the current type, as a staticClass
object (e.g.MyClass.class
)
-
-
Method Detail
-
values
public static LocationReferenceOption[] 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 (LocationReferenceOption c : LocationReferenceOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LocationReferenceOption 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
-
valueOfIgnoreCase
@Nonnull public static LocationReferenceOption valueOfIgnoreCase(@Nonnull String pValue)
Variant ofEnum.valueOf(java.lang.Class<T>, java.lang.String)
that ignores value case.- Parameters:
pValue
- the String value- Returns:
- the enum value
- Throws:
IllegalArgumentException
- the given String value does not match a valid enum value
-
-