Package spoon.reflect.declaration
Enum ModifierKind
- All Implemented Interfaces:
Serializable
,Comparable<ModifierKind>
Represents a modifier on the declaration of a program element such as a
class, method, or field.
The order is important, because it is always pretty--printed is this order, enabling to have a JLS-compliant,
checkstyle compliant generated code (thanks to EnumSet used for modifiers).
-
Enum Constant Summary
Enum ConstantDescriptionThe modifier abstractThe modifier finalThe modifier nativeThe modifier non-sealedThe modifier privateThe modifier protectedThe modifier publicThe modifier sealedThe modifier staticThe modifier strictfpThe modifier synchronizedThe modifier transientThe modifier volatile -
Method Summary
Modifier and TypeMethodDescriptiontoString()
Returns this modifier's name in lowercase.static ModifierKind
Returns the enum constant of this type with the specified name.static ModifierKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PUBLIC
The modifier public -
PROTECTED
The modifier protected -
PRIVATE
The modifier private -
ABSTRACT
The modifier abstract -
STATIC
The modifier static -
FINAL
The modifier final -
TRANSIENT
The modifier transient -
VOLATILE
The modifier volatile -
SYNCHRONIZED
The modifier synchronized -
NATIVE
The modifier native -
STRICTFP
The modifier strictfp -
NON_SEALED
The modifier non-sealed -
SEALED
The modifier sealed
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
toString
Returns this modifier's name in lowercase.- Overrides:
toString
in classEnum<ModifierKind>
-