Package org.eclipse.jdt.core.dom
Class Modifier.ModifierKeyword
- java.lang.Object
-
- org.eclipse.jdt.core.dom.Modifier.ModifierKeyword
-
-
Field Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
toFlagValue()
Returns the modifier flag value corresponding to this modifier keyword.static Modifier.ModifierKeyword
toKeyword(String keyword)
Returns the modifier corresponding to the given string, ornull
if none.String
toString()
Returns the keyword for the modifier.
-
-
-
Field Detail
-
ABSTRACT_KEYWORD
public static final Modifier.ModifierKeyword ABSTRACT_KEYWORD
"abstract" modifier with flag valueModifier.ABSTRACT
.
-
FINAL_KEYWORD
public static final Modifier.ModifierKeyword FINAL_KEYWORD
"final" modifier with flag valueModifier.FINAL
.
-
NATIVE_KEYWORD
public static final Modifier.ModifierKeyword NATIVE_KEYWORD
"native" modifier with flag valueModifier.NATIVE
.
-
PRIVATE_KEYWORD
public static final Modifier.ModifierKeyword PRIVATE_KEYWORD
"private" modifier with flag valueModifier.PRIVATE
.
-
PROTECTED_KEYWORD
public static final Modifier.ModifierKeyword PROTECTED_KEYWORD
"protected" modifier with flag valueModifier.PROTECTED
.
-
PUBLIC_KEYWORD
public static final Modifier.ModifierKeyword PUBLIC_KEYWORD
"public" modifier with flag valueModifier.PUBLIC
.
-
STATIC_KEYWORD
public static final Modifier.ModifierKeyword STATIC_KEYWORD
"static" modifier with flag valueModifier.STATIC
.
-
STRICTFP_KEYWORD
public static final Modifier.ModifierKeyword STRICTFP_KEYWORD
"strictfp" modifier with flag valueModifier.STRICTFP
.
-
SYNCHRONIZED_KEYWORD
public static final Modifier.ModifierKeyword SYNCHRONIZED_KEYWORD
"synchronized" modifier with flag valueModifier.SYNCHRONIZED
.
-
TRANSIENT_KEYWORD
public static final Modifier.ModifierKeyword TRANSIENT_KEYWORD
"transient" modifier with flag valueModifier.TRANSIENT
.
-
VOLATILE_KEYWORD
public static final Modifier.ModifierKeyword VOLATILE_KEYWORD
"volatile" modifier with flag valueModifier.VOLATILE
.
-
DEFAULT_KEYWORD
public static final Modifier.ModifierKeyword 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
-
-
Method Detail
-
fromFlagValue
public static 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.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:
toFlagValue()
-
toKeyword
public static Modifier.ModifierKeyword toKeyword(String keyword)
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:
toString()
-
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:
fromFlagValue(int)
-
toString
public String toString()
Returns the keyword for the modifier.- Overrides:
toString
in classObject
- Returns:
- the keyword for the modifier
- See Also:
toKeyword(String)
-
-