Android
java.lang.reflect
public class

java.lang.reflect.Modifier

java.lang.Object
java.lang.reflect.Modifier

This class provides methods to decode class and member modifiers.

Summary

Constants

      Value  
int  ABSTRACT    1024  0x00000400 
int  FINAL    16  0x00000010 
int  INTERFACE    512  0x00000200 
int  NATIVE    256  0x00000100 
int  PRIVATE    0x00000002 
int  PROTECTED    0x00000004 
int  PUBLIC    0x00000001 
int  STATIC    0x00000008 
int  STRICT    2048  0x00000800 
int  SYNCHRONIZED    32  0x00000020 
int  TRANSIENT    128  0x00000080 
int  VOLATILE    64  0x00000040 

Public Constructors

            Modifier()

Public Methods

      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

Details

Constants

public static final int ABSTRACT

Constant Value: 1024 (0x00000400)

public static final int FINAL

Constant Value: 16 (0x00000010)

public static final int INTERFACE

Constant Value: 512 (0x00000200)

public static final int NATIVE

Constant Value: 256 (0x00000100)

public static final int PRIVATE

Constant Value: 2 (0x00000002)

public static final int PROTECTED

Constant Value: 4 (0x00000004)

public static final int PUBLIC

Constant Value: 1 (0x00000001)

public static final int STATIC

Constant Value: 8 (0x00000008)

public static final int STRICT

Constant Value: 2048 (0x00000800)

public static final int SYNCHRONIZED

Constant Value: 32 (0x00000020)

public static final int TRANSIENT

Constant Value: 128 (0x00000080)

public static final int VOLATILE

Constant Value: 64 (0x00000040)

Public Constructors

public Modifier()

Public Methods

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

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

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

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

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

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

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

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

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

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

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

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

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
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56