ModifierNameModifierSynopsis
DescriptionThe 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. Class Summary
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); } ConstantsABSTRACTpublic final static int ABSTRACT
FINALpublic final static int FINAL
INTERFACEpublic final static int INTERFACE
NATIVEpublic final static int NATIVE
PRIVATEpublic final static int PRIVATE
PROTECTEDpublic final static int PROTECTED
PUBLICpublic final static int PUBLIC
STATICpublic final static int STATIC
SYNCHRONIZEDpublic final static int SYNCHRONIZED
TRANSIENTpublic final static int TRANSIENT
VOLATILEpublic final static int VOLATILE
Class MethodsisAbstractpublic static boolean isAbstract(int mod)
isFinalpublic static boolean isFinal(int mod)
isInterfacepublic static boolean isInterface(int mod)
isNativepublic static boolean isNative(int mod)
isPrivatepublic static boolean isPrivate(int mod)
isProtectedpublic static boolean isProtected(int mod)
isPublicpublic static boolean isPublic(int mod)
isStaticpublic static boolean isStatic(int mod)
isSynchronizedpublic static boolean isSynchronized(int mod)
isTransientpublic static boolean isTransient(int mod)
isVolatilepublic static boolean isVolatile(int mod)
toStringpublic static String toString(int mod)
Inherited Methods
See AlsoClass, Constructor, Field, Member | ||||||||||||||||||||||||||||
|