Build 1.0_r1(from source)

java.lang.reflect
Class Modifier

java.lang.Object
  extended by java.lang.reflect.Modifier

public class Modifier
extends Object

This class provides methods to decode class and member modifiers.

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

Field Summary
static int ABSTRACT
           
(package private) static int ANNOTATION
           
(package private) static int BRIDGE
           
(package private) static int ENUM
           
static int FINAL
           
static int INTERFACE
           
static int NATIVE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int STATIC
           
static int STRICT
           
static int SYNCHRONIZED
           
(package private) static int SYNTHETIC
           
static int TRANSIENT
           
(package private) static int VARARGS
           
static int VOLATILE
           
 
Constructor Summary
Modifier()
           
 
Method Summary
static boolean isAbstract(int modifiers)
          Return true if the specified modifiers contain the abstract modifier, false otherwise.
static boolean isFinal(int modifiers)
          Return true if the specified modifiers contain the final modifier, false otherwise.
static boolean isInterface(int modifiers)
          Return true if the specified modifiers contain the interface modifier, false otherwise.
static boolean isNative(int modifiers)
          Return true if the specified modifiers contain the native modifier, false otherwise.
static boolean isPrivate(int modifiers)
          Return true if the specified modifiers contain the private modifier, false otherwise.
static boolean isProtected(int modifiers)
          Return true if the specified modifiers contain the protected modifier, false otherwise.
static boolean isPublic(int modifiers)
          Return true if the specified modifiers contain the public modifier, false otherwise.
static boolean isStatic(int modifiers)
          Return true if the specified modifiers contain the static modifier, false otherwise.
static boolean isStrict(int modifiers)
          Return true if the specified modifiers contain the strict modifier, false otherwise.
static boolean isSynchronized(int modifiers)
          Return true if the specified modifiers contain the synchronized modifier, false otherwise.
static boolean isTransient(int modifiers)
          Return true if the specified modifiers contain the transient modifier, false otherwise.
static boolean isVolatile(int modifiers)
          Return true if the specified modifiers contain the volatile modifier, false otherwise.
static String toString(int modifiers)
          Returns a string containing the string representation of all modifiers present in the specified modifiers.
 
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
See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

STATIC

public static final int STATIC
See Also:
Constant Field Values

FINAL

public static final int FINAL
See Also:
Constant Field Values

SYNCHRONIZED

public static final int SYNCHRONIZED
See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
See Also:
Constant Field Values

TRANSIENT

public static final int TRANSIENT
See Also:
Constant Field Values

NATIVE

public static final int NATIVE
See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
See Also:
Constant Field Values

ABSTRACT

public static final int ABSTRACT
See Also:
Constant Field Values

STRICT

public static final int STRICT
See Also:
Constant Field Values

BRIDGE

static final int BRIDGE
See Also:
Constant Field Values

VARARGS

static final int VARARGS
See Also:
Constant Field Values

SYNTHETIC

static final int SYNTHETIC
See Also:
Constant Field Values

ANNOTATION

static final int ANNOTATION
See Also:
Constant Field Values

ENUM

static final int ENUM
See Also:
Constant Field Values
Constructor Detail

Modifier

public Modifier()
Method Detail

isAbstract

public static boolean isAbstract(int modifiers)
Return true if the specified modifiers contain the abstract modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the abstract modifier

isFinal

public static boolean isFinal(int modifiers)
Return true if the specified modifiers contain the final modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the final modifier

isInterface

public static boolean isInterface(int modifiers)
Return true if the specified modifiers contain the interface modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the interface modifier

isNative

public static boolean isNative(int modifiers)
Return true if the specified modifiers contain the native modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the native modifier

isPrivate

public static boolean isPrivate(int modifiers)
Return true if the specified modifiers contain the private modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the private modifier

isProtected

public static boolean isProtected(int modifiers)
Return true if the specified modifiers contain the protected modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the protected modifier

isPublic

public static boolean isPublic(int modifiers)
Return true if the specified modifiers contain the public modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the abstract modifier

isStatic

public static boolean isStatic(int modifiers)
Return true if the specified modifiers contain the static modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the static modifier

isStrict

public static boolean isStrict(int modifiers)
Return true if the specified modifiers contain the strict modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the strict modifier

isSynchronized

public static boolean isSynchronized(int modifiers)
Return true if the specified modifiers contain the synchronized modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the synchronized modifier

isTransient

public static boolean isTransient(int modifiers)
Return true if the specified modifiers contain the transient modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the transient modifier

isVolatile

public static boolean isVolatile(int modifiers)
Return true if the specified modifiers contain the volatile modifier, false otherwise.

Parameters:
modifiers - the modifiers to test
Returns:
if the modifiers contain the volatile modifier

toString

public static String toString(int modifiers)
Returns a string containing the string representation of all modifiers present in the specified modifiers. Modifiers appear in the order specified by the Java Language Specification: public private protected abstract static final transient volatile native synchronized interface strict

Parameters:
modifiers - the modifiers to print
Returns:
a printable representation of the modifiers

Build 1.0_r1(from source)

Please submit a feedback, bug or feature