java.lang.reflect.Modifier
java.lang.Object
None
None
New as of JDK 1.1
The Modifier class defines a number of constants and static methods that can decode the modifier values returned by the getModifiers() methods of the Class, Constructor, Field, and Method classes. In other words, you can use the methods in this class to determine the modifiers used to declare a class or a member of a class. The constants in the Modifier class specify the bit values used to represent the various modifiers in a modifier value. You can use these constants to test for modifiers if you want to handle the boolean algebra yourself.
public class java.lang.reflect.Modifier extends java.lang.Object { // Constants public final static int ABSTRACT; public final static int FINAL; public final static int INTERFACE; public final static int NATIVE; public final static int PRIVATE; public final static int PROTECTED; public final static int PUBLIC; public final static int STATIC; public final static int SYNCHRONIZED; public final static int TRANSIENT; public final static int VOLATILE; // Class Methods public static boolean isAbstract(int mod); public static boolean isFinal(int mod); public static boolean isInterface(int mod); public static boolean isNative(int mod); public static boolean isPrivate(int mod); public static boolean isProtected(int mod); public static boolean isPublic(int mod); public static boolean isStatic(int mod); public static boolean isSynchronized(int mod); public static boolean isTransient(int mod); public static boolean isVolatile(int mod); public static String toString(int mod); }
A constant that represents the abstract modifier.
A constant that represents the final modifier.
A constant that represents the interface keyword.
A constant that represents the native modifier.
A constant that represents the private modifier.
A constant that represents the protected modifier.
A constant that represents the public modifier.
A constant that represents the static modifier.
A constant that represents the synchronized modifier.
A constant that represents the transient modifier.
A constant that represents the volatile modifier.
The modifier value to test.
true if the given modifier value includes the abstract modifier; false otherwise.
This method tests the given modifier value for the ABSTRACT constant.
The modifier value to test.
true if the given modifier value includes the final modifier; false otherwise.
This method tests the given modifier value for the FINAL constant.
The modifier value to test.
true if the given modifier value includes the interface keyword; false otherwise.
This method tests the given modifier value for the INTERFACE constant.
The modifier value to test.
true if the given modifier value includes the native modifier; false otherwise.
This method tests the given modifier value for the NATIVE constant.
The modifier value to test.
true if the given modifier value includes the private modifier; false otherwise.
This method tests the given modifier value for the PRIVATE constant.
The modifier value to test.
true if the given modifier value includes the protected modifier; false otherwise.
This method tests the given modifier value for the PROTECTED constant.
The modifier value to test.
true if the given modifier value includes the public modifier; false otherwise.
This method tests the given modifier value for the PUBLIC constant.
The modifier value to test.
true if the given modifier value includes the static modifier; false otherwise.
This method tests the given modifier value for the STATIC constant.
The modifier value to test.
true if the given modifier value includes the synchronized modifier; false otherwise.
This method tests the given modifier value for the SYNCHRONIZED constant.
The modifier value to test.
true if the given modifier value includes the transient modifier; false otherwise.
This method tests the given modifier value for the TRANSIENT constant.
The modifier value to test.
true if the given modifier value includes the volatile modifier; false otherwise.
This method tests the given modifier value for the VOLATILE constant.
The modifier value to represent as a string.
A string representation of the given modifier value.
This method returns a string that represents the given modifier value. This string contains all of the modifiers specified by the given modifier value.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Class, Constructor, Field, Member
This HTML Help has been published using the chm2web software. |