Documentation  › java.lang.reflect  › Modifier
 
 


  Modifier
  public

  Inherits From:   Object
  Conforms To:   none
  Declared In:   java.lang.reflect


Class Description
 
The Modifier class provides static methods and constants to decode class and member access modifiers. The sets of modifiers are represented as integers with distinct bit positions representing different modifiers. The values for the constants representing the modifiers are taken from The JavaTM Virtual Machine Specification, Second edition tables 4.1, 4.4, 4.5, and 4.7.


Class Variables
 
PUBLIC
public static final int

The int value representing the public modifier.


PRIVATE
public static final int

The int value representing the private modifier.


PROTECTED
public static final int

The int value representing the protected modifier.


STATIC
public static final int

The int value representing the static modifier.


FINAL
public static final int

The int value representing the final modifier.


SYNCHRONIZED
public static final int

The int value representing the synchronized modifier.


VOLATILE
public static final int

The int value representing the volatile modifier.


TRANSIENT
public static final int

The int value representing the transient modifier.


NATIVE
public static final int

The int value representing the native modifier.


INTERFACE
public static final int

The int value representing the interface modifier.


ABSTRACT
public static final int

The int value representing the abstract modifier.


STRICT
public static final int

The int value representing the strictfp modifier.


Instance Variables
 
None declared in this class.


Constructors
 
Modifier
public Modifier( )

No description available for this constructor.


Class Methods
 
isAbstract
public static boolean isAbstract( int mod )

Return true if the integer argument includes the abstract modifer, false otherwise.


isFinal
public static boolean isFinal( int mod )

Return true if the integer argument includes the final modifer, false otherwise.


isInterface
public static boolean isInterface( int mod )

Return true if the integer argument includes the interface modifer, false otherwise.


isNative
public static boolean isNative( int mod )

Return true if the integer argument includes the native modifer, false otherwise.


isPrivate
public static boolean isPrivate( int mod )

Return true if the integer argument includes the private modifer, false otherwise.


isProtected
public static boolean isProtected( int mod )

Return true if the integer argument includes the protected modifer, false otherwise.


isPublic
public static boolean isPublic( int mod )

Return true if the integer argument includes the public modifer, false otherwise.


isStatic
public static boolean isStatic( int mod )

Return true if the integer argument includes the static modifer, false otherwise.


isStrict
public static boolean isStrict( int mod )

Return true if the integer argument includes the strictfp modifer, false otherwise.


isSynchronized
public static boolean isSynchronized( int mod )

Return true if the integer argument includes the synchronized modifer, false otherwise.


isTransient
public static boolean isTransient( int mod )

Return true if the integer argument includes the transient modifer, false otherwise.


isVolatile
public static boolean isVolatile( int mod )

Return true if the integer argument includes the volatile modifer, false otherwise.


toString
public static String toString( int mod )

Return a string describing the access modifier flags in the specified modifier. For example:
 
public final synchronized strictfp 
The modifier names are returned in an order consistent with the suggested modifier orderings given in The Java Language Specification, Second Edition sections §8.1.1, §8.3.1, §8.4.3, §8.8.3, and §9.1.1. The full modifier ordering used by this method is:
public protected private abstract static final transient volatile synchronized native strictfp interface
The interface modifier discussed in this class is not a true modifier in the Java language and it appears after all other modifiers listed by this method. This method may return a string of modifiers that are not valid modifiers of a Java entity; in other words, no checking is done on the possible validity of the combination of modifiers represented by the input.


Instance Methods
 
None declared in this class.


Known Subclasses
 
None.



 
 
  dydoc
  3/10/05