#

| Chapter 26 The java.lang.reflect Package |

## 26.7 java.lang.reflect.Modifier (JDK 1.1)

###

This class defines a number of constants and static methods that are used to interpret the integer values returned by the `getModifiers()` methods of the `Field`, `Method`, and `Constructor` classes. The `isPublic()`, `isAbstract()`, and related methods return `true` if the modifiers value includes the specified modifier, otherwise they return `false`.

The constants defined by this class specify the various bit flags used in the modifiers value. You can use these constants to test for modifiers if you want to perform your own boolean algebra.

    public class Modifier extends Object {
        // Default Constructor: public Modifier()
        // Constants
                public static final int ABSTRACT;
                public static final int FINAL;
                public static final int INTERFACE;
                public static final int NATIVE;
                public static final int PRIVATE;
                public static final int PROTECTED;
                public static final int PUBLIC;
                public static final int STATIC;
                public static final int SYNCHRONIZED;
                public static final int TRANSIENT;
                public static final 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);
    }

java.lang.reflect.Method (JDK 1.1) |  | The java.math Package