Contents | Prev | Next | Java Core Reflection |
package java.lang.reflect;
public final class Modifier extends Object
The Modifier
class is an uninstantiable class that exports static methods and
constants that are used to decode the Java language modifiers for classes and
members, which are encoded in an integer.
public final static int PUBLIC
The integer constant for the public
access modifier.
public final static int PRIVATE
The integer constant for the private
access modifier.
public final static int PROTECTED
The integer constant for the protected
access modifier.
public final static int STATIC
The integer constant for the static
modifier.
public final static int FINAL
The integer constant for the final
modifier.
public final static int SYNCHRONIZED
The integer constant for the synchronized
modifier.
public final static int VOLATILE
The integer constant for the volatile
modifier.
public final static int TRANSIENT
The integer constant for the transient
modifier.
public final static int NATIVE
The integer constant for the native
modifier.
public final static int INTERFACE
The integer constant for the interface
modifier.
public final static int ABSTRACT
The integer constant for the abstract
modifier.
public static boolean isPublic(int mod)
Returns true
if the specified integer includes the public
modifier.
public static boolean isPrivate(int mod)
Returns true
if the specified integer includes the private
modifier.
public static boolean isProtected(int mod)
Returns true
if the specified integer includes the protected
modifier.
public static boolean isStatic(int mod)
Returns true
if the specified integer includes the static
modifier.
public static boolean isFinal(int mod)
Returns true
if the specified integer includes the final
modifier.
public static boolean isSynchronized(int mod)
Returns true
if the specified integer includes the synchronized
modifier.
public static boolean isVolatile(int mod)
Returns true
if the specified integer includes the volatile
modifier..
public static boolean isTransient(int mod)
Returns true
if the specified integer includes the transient
modifier..
public static boolean isNative(int mod)
Returns true
if the specified integer includes the native
modifier..
public static boolean isInterface(int mod)
Returns true if the specified integer includes the interface
modifier..
public static boolean isAbstract(int mod)
Returns true if the specified integer includes the abstract
modifier..
public static String toString(int mod)
Returns a string containing a space-separated list of the names of the modifiers
included in the specified integer. For example:
public final synchronized
private transient volatile
The modifier names are returned in canonical order as specified by The Java
Language Specification.