Package org.eclipse.jdt.core.dom
Class Modifier.ModifierKeyword
java.lang.Object
org.eclipse.jdt.core.dom.Modifier.ModifierKeyword
- Enclosing class:
- Modifier
Modifier keywords (typesafe enumeration).
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Modifier.ModifierKeyword
"abstract" modifier with flag valueModifier.ABSTRACT
.static final Modifier.ModifierKeyword
"default" modifier with flag valueModifier.DEFAULT
(added in JLS8 API).static final Modifier.ModifierKeyword
"final" modifier with flag valueModifier.FINAL
.static final Modifier.ModifierKeyword
static final Modifier.ModifierKeyword
"native" modifier with flag valueModifier.NATIVE
.static final Modifier.ModifierKeyword
static final Modifier.ModifierKeyword
"private" modifier with flag valueModifier.PRIVATE
.static final Modifier.ModifierKeyword
"protected" modifier with flag valueModifier.PROTECTED
.static final Modifier.ModifierKeyword
"public" modifier with flag valueModifier.PUBLIC
.static final Modifier.ModifierKeyword
static final Modifier.ModifierKeyword
"static" modifier with flag valueModifier.STATIC
.static final Modifier.ModifierKeyword
"strictfp" modifier with flag valueModifier.STRICTFP
.static final Modifier.ModifierKeyword
"synchronized" modifier with flag valueModifier.SYNCHRONIZED
.static final Modifier.ModifierKeyword
"transient" modifier with flag valueModifier.TRANSIENT
.static final Modifier.ModifierKeyword
"volatile" modifier with flag valueModifier.VOLATILE
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Modifier.ModifierKeyword
fromFlagValue
(int flagValue) Returns the modifier corresponding to the given single-bit flag value, ornull
if none or if more than one bit is set.int
Returns the modifier flag value corresponding to this modifier keyword.static Modifier.ModifierKeyword
Returns the modifier corresponding to the given string, ornull
if none.toString()
Returns the keyword for the modifier.
-
Field Details
-
ABSTRACT_KEYWORD
"abstract" modifier with flag valueModifier.ABSTRACT
. -
FINAL_KEYWORD
"final" modifier with flag valueModifier.FINAL
. -
NATIVE_KEYWORD
"native" modifier with flag valueModifier.NATIVE
. -
PRIVATE_KEYWORD
"private" modifier with flag valueModifier.PRIVATE
. -
PROTECTED_KEYWORD
"protected" modifier with flag valueModifier.PROTECTED
. -
PUBLIC_KEYWORD
"public" modifier with flag valueModifier.PUBLIC
. -
STATIC_KEYWORD
"static" modifier with flag valueModifier.STATIC
. -
STRICTFP_KEYWORD
"strictfp" modifier with flag valueModifier.STRICTFP
. -
SYNCHRONIZED_KEYWORD
"synchronized" modifier with flag valueModifier.SYNCHRONIZED
. -
TRANSIENT_KEYWORD
"transient" modifier with flag valueModifier.TRANSIENT
. -
VOLATILE_KEYWORD
"volatile" modifier with flag valueModifier.VOLATILE
. -
DEFAULT_KEYWORD
"default" modifier with flag valueModifier.DEFAULT
(added in JLS8 API).Note that the value of this modifier is internal and is not specified in the Java Virtual Machine Specification.
- Since:
- 3.10
-
SEALED_KEYWORD
- Since:
- 3.24
-
NON_SEALED_KEYWORD
- Since:
- 3.24
-
MODULE_KEYWORD
- Since:
- 3.40
- Restriction:
- preview feature
-
-
Method Details
-
fromFlagValue
Returns the modifier corresponding to the given single-bit flag value, ornull
if none or if more than one bit is set.fromFlagValue
is the converse oftoFlagValue
: that is,ModifierKind.fromFlagValue(k.toFlagValue()) == k
for all modifier keywordsk
.- Parameters:
flagValue
- the single-bit flag value for the modifier- Returns:
- the modifier keyword, or
null
if none - See Also:
-
toKeyword
Returns the modifier corresponding to the given string, ornull
if none.toKeyword
is the converse oftoString
: that is,ModifierKind.toKeyword(k.toString()) == k
for all modifier keywordsk
.- Parameters:
keyword
- the lowercase string name for the modifier- Returns:
- the modifier keyword, or
null
if none - See Also:
-
toFlagValue
public int toFlagValue()Returns the modifier flag value corresponding to this modifier keyword. These flag values are as described in the Java Virtual Machine Specification.- Returns:
- one of the
Modifier
constants - See Also:
-
toString
Returns the keyword for the modifier.
-