Java Platform 1.2

java.lang.reflect
Class Modifier

java.lang.Object
  |
  +--java.lang.reflect.Modifier

public class Modifier
extends Object

The Modifier class provides static methods and constants to decode class and member access modifiers.

See Also:
Class.getModifiers(), Member.getModifiers()

Field Summary
static int ABSTRACT
          The int value representing the abstract modifier.
static int FINAL
          The int value representing the final modifier.
static int INTERFACE
          The int value representing the interface modifier.
static int NATIVE
          The int value representing the native modifier.
static int PRIVATE
          The int value representing the private modifier.
static int PROTECTED
          The int value representing the protected modifier.
static int PUBLIC
          The int value representing the public modifier.
static int STATIC
          The int value representing the static modifier.
static int STRICT
          The int value representing the strict modifier.
static int SYNCHRONIZED
          The int value representing the synchronized modifier.
static int TRANSIENT
          The int value representing the transient modifier.
static int VOLATILE
          The int value representing the volatile modifier.
 
Constructor Summary
Modifier()
           
 
Method Summary
static boolean isAbstract(int mod)
          Return true if the specifier integer includes the abstract modifier.
static boolean isFinal(int mod)
          Return true if the specified integer includes the final modifier.
static boolean isInterface(int mod)
          Return true if the specifier integer includes the interface modifier.
static boolean isNative(int mod)
          Return true if the specifier integer includes the native modifier.
static boolean isPrivate(int mod)
          Return true if the specifier integer includes the private modifier.
static boolean isProtected(int mod)
          Return true if the specifier integer includes the protected modifier.
static boolean isPublic(int mod)
          Return true if the specified integer includes the public modifier.
static boolean isStatic(int mod)
          Return true if the specifier integer includes the static modifier.
static boolean isStrict(int mod)
          Return true if the specifier integer includes the strict modifier.
static boolean isSynchronized(int mod)
          Return true if the specified integer includes the synchronized modifier.
static boolean isTransient(int mod)
          Return true if the specifier integer includes the transient modifier.
static boolean isVolatile(int mod)
          Return true if the specified integer includes the volatile modifier.
static String toString(int mod)
          Return a string describing the access modifier flags in the specified modifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC

public static final int PUBLIC
The int value representing the public modifier.

PRIVATE

public static final int PRIVATE
The int value representing the private modifier.

PROTECTED

public static final int PROTECTED
The int value representing the protected modifier.

STATIC

public static final int STATIC
The int value representing the static modifier.

FINAL

public static final int FINAL
The int value representing the final modifier.

SYNCHRONIZED

public static final int SYNCHRONIZED
The int value representing the synchronized modifier.

VOLATILE

public static final int VOLATILE
The int value representing the volatile modifier.

TRANSIENT

public static final int TRANSIENT
The int value representing the transient modifier.

NATIVE

public static final int NATIVE
The int value representing the native modifier.

INTERFACE

public static final int INTERFACE
The int value representing the interface modifier.

ABSTRACT

public static final int ABSTRACT
The int value representing the abstract modifier.

STRICT

public static final int STRICT
The int value representing the strict modifier.
Constructor Detail

Modifier

public Modifier()
Method Detail

isPublic

public static boolean isPublic(int mod)
Return true if the specified integer includes the public modifier.

isPrivate

public static boolean isPrivate(int mod)
Return true if the specifier integer includes the private modifier.

isProtected

public static boolean isProtected(int mod)
Return true if the specifier integer includes the protected modifier.

isStatic

public static boolean isStatic(int mod)
Return true if the specifier integer includes the static modifier.

isFinal

public static boolean isFinal(int mod)
Return true if the specified integer includes the final modifier.

isSynchronized

public static boolean isSynchronized(int mod)
Return true if the specified integer includes the synchronized modifier.

isVolatile

public static boolean isVolatile(int mod)
Return true if the specified integer includes the volatile modifier.

isTransient

public static boolean isTransient(int mod)
Return true if the specifier integer includes the transient modifier.

isNative

public static boolean isNative(int mod)
Return true if the specifier integer includes the native modifier.

isInterface

public static boolean isInterface(int mod)
Return true if the specifier integer includes the interface modifier.

isAbstract

public static boolean isAbstract(int mod)
Return true if the specifier integer includes the abstract modifier.

isStrict

public static boolean isStrict(int mod)
Return true if the specifier integer includes the strict modifier.

toString

public static String toString(int mod)
Return a string describing the access modifier flags in the specified modifier. For example:
    public final synchronized
    private transient volatile
 
The modifier names are return in canonical order, as specified by The Java Language Specification.

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.