static
methods and
constants to decode class and member access modifiers. The sets of
modifiers are represented as integers with distinct bit positions
representing different modifiers. The values for the constants
representing the modifiers are taken from the tables in sections
4.1, 4.4, 4.5, and 4.7 of
The Java Virtual Machine Specification.
Class#getModifiers()
, Member#getModifiers()
Modifier and Type | Field and Description |
---|---|
public static final int | ABSTRACT
The |
pack-priv static final int | |
pack-priv static final int | |
pack-priv static final int | |
private static final int | CLASS_MODIFIERS
The Java source modifiers that can be applied to a class. |
private static final int | CONSTRUCTOR_MODIFIERS
The Java source modifiers that can be applied to a constructor. |
pack-priv static final int | |
private static final int | FIELD_MODIFIERS
The Java source modifiers that can be applied to a field. |
public static final int | FINAL
The |
public static final int | INTERFACE
The |
private static final int | INTERFACE_MODIFIERS
The Java source modifiers that can be applied to an interface. |
pack-priv static final int | |
private static final int | METHOD_MODIFIERS
The Java source modifiers that can be applied to a method. |
public static final int | NATIVE
The |
private static final int | PARAMETER_MODIFIERS
The Java source modifiers that can be applied to a method or constructor parameter. |
public static final int | PRIVATE
The |
public static final int | PROTECTED
The |
public static final int | PUBLIC
The |
public static final int | STATIC
The |
public static final int | STRICT
The |
public static final int | SYNCHRONIZED
The |
pack-priv static final int | |
public static final int | TRANSIENT
The |
pack-priv static final int | |
public static final int | VOLATILE
The |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to a class.Return an |
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to a constructor.Return an |
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to a field.Return an |
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to an interface.Return an |
public static boolean | Returns: true if mod includes the
abstract modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
final modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
interface modifier; false otherwise.a set of modifiers mod)Return |
pack-priv static boolean | |
public static boolean | Returns: true if mod includes the
native modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
private modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
protected modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
public modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
static modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
strictfp modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
synchronized modifier; false otherwise.a set of modifiers mod)Return |
pack-priv static boolean | |
public static boolean | Returns: true if mod includes the
transient modifier; false otherwise.a set of modifiers mod)Return |
public static boolean | Returns: true if mod includes the
volatile modifier; false otherwise.a set of modifiers mod)Return |
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to a method.Return an |
public static int | Returns: anint value OR-ing together the source language
modifiers that can be applied to a parameter.Return an |
public static String | Returns: a string representation of the set of modifiers represented bymod a set of modifiers mod)Return a string describing the access modifier flags in the specified modifier. |
ABSTRACT | back to summary |
---|---|
public static final int ABSTRACT The
|
ACCESS_MODIFIERS | back to summary |
---|---|
pack-priv static final int ACCESS_MODIFIERS |
ANNOTATION | back to summary |
---|---|
pack-priv static final int ANNOTATION |
BRIDGE | back to summary |
---|---|
pack-priv static final int BRIDGE |
CLASS_MODIFIERS | back to summary |
---|---|
private static final int CLASS_MODIFIERS The Java source modifiers that can be applied to a class.
|
CONSTRUCTOR_MODIFIERS | back to summary |
---|---|
private static final int CONSTRUCTOR_MODIFIERS The Java source modifiers that can be applied to a constructor.
|
ENUM | back to summary |
---|---|
pack-priv static final int ENUM |
FIELD_MODIFIERS | back to summary |
---|---|
private static final int FIELD_MODIFIERS The Java source modifiers that can be applied to a field.
|
FINAL | back to summary |
---|---|
public static final int FINAL The
|
INTERFACE | back to summary |
---|---|
public static final int INTERFACE The
|
INTERFACE_MODIFIERS | back to summary |
---|---|
private static final int INTERFACE_MODIFIERS The Java source modifiers that can be applied to an interface.
|
MANDATED | back to summary |
---|---|
pack-priv static final int MANDATED |
METHOD_MODIFIERS | back to summary |
---|---|
private static final int METHOD_MODIFIERS The Java source modifiers that can be applied to a method.
|
NATIVE | back to summary |
---|---|
public static final int NATIVE The
|
PARAMETER_MODIFIERS | back to summary |
---|---|
private static final int PARAMETER_MODIFIERS The Java source modifiers that can be applied to a method or constructor parameter.
|
PRIVATE | back to summary |
---|---|
public static final int PRIVATE The
|
PROTECTED | back to summary |
---|---|
public static final int PROTECTED The
|
PUBLIC | back to summary |
---|---|
public static final int PUBLIC The
|
STATIC | back to summary |
---|---|
public static final int STATIC The
|
STRICT | back to summary |
---|---|
public static final int STRICT The
|
SYNCHRONIZED | back to summary |
---|---|
public static final int SYNCHRONIZED The
|
SYNTHETIC | back to summary |
---|---|
pack-priv static final int SYNTHETIC |
TRANSIENT | back to summary |
---|---|
public static final int TRANSIENT The
|
VARARGS | back to summary |
---|---|
pack-priv static final int VARARGS |
VOLATILE | back to summary |
---|---|
public static final int VOLATILE The
|
Modifier | back to summary |
---|---|
private Modifier() Do not call. |
classModifiers | back to summary |
---|---|
public static int classModifiers() Return an
|
constructorModifiers | back to summary |
---|---|
public static int constructorModifiers() Return an
|
fieldModifiers | back to summary |
---|---|
public static int fieldModifiers() Return an
|
interfaceModifiers | back to summary |
---|---|
public static int interfaceModifiers() Return an
|
isAbstract | back to summary |
---|---|
public static boolean isAbstract(int mod) Return
|
isFinal | back to summary |
---|---|
public static boolean isFinal(int mod) Return
|
isInterface | back to summary |
---|---|
public static boolean isInterface(int mod) Return
|
isMandated | back to summary |
---|---|
pack-priv static boolean isMandated(int mod) |
isNative | back to summary |
---|---|
public static boolean isNative(int mod) Return
|
isPrivate | back to summary |
---|---|
public static boolean isPrivate(int mod) Return
|
isProtected | back to summary |
---|---|
public static boolean isProtected(int mod) Return
|
isPublic | back to summary |
---|---|
public static boolean isPublic(int mod) Return
|
isStatic | back to summary |
---|---|
public static boolean isStatic(int mod) Return
|
isStrict | back to summary |
---|---|
public static boolean isStrict(int mod) Return
|
isSynchronized | back to summary |
---|---|
public static boolean isSynchronized(int mod) Return
|
isSynthetic | back to summary |
---|---|
pack-priv static boolean isSynthetic(int mod) |
isTransient | back to summary |
---|---|
public static boolean isTransient(int mod) Return
|
isVolatile | back to summary |
---|---|
public static boolean isVolatile(int mod) Return
|
methodModifiers | back to summary |
---|---|
public static int methodModifiers() Return an
|
parameterModifiers | back to summary |
---|---|
public static int parameterModifiers() Return an
|
toString | back to summary |
---|---|
public static String toString(int mod) Return a string describing the access modifier flags in the specified modifier. For example: The modifier names are returned in an order consistent with the suggested modifier orderings given in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1 of The Java Language Specification. The full modifier ordering used by this method is:public final synchronized strictfp
The interface modifier discussed in this class is
not a true modifier in the Java language and it appears after
all other modifiers listed by this method. This method may
return a string of modifiers that are not valid modifiers of a
Java entity; in other words, no checking is done on the
possible validity of the combination of modifiers represented
by the input.
Note that to perform such checking for a known kind of entity,
such as a constructor or method, first AND the argument of
toString with the appropriate mask from a method like
constructorModifiers or methodModifiers .
|