Android APIs
public class

Modifier

extends Object
java.lang.Object
   ↳ java.lang.reflect.Modifier

Class Overview

This class provides static methods to decode class and member modifiers.

Summary

Constants
int ABSTRACT The int value representing the abstract modifier.
int FINAL The int value representing the final modifier.
int INTERFACE The int value representing the interface modifier.
int NATIVE The int value representing the native modifier.
int PRIVATE The int value representing the private modifier.
int PROTECTED The int value representing the protected modifier.
int PUBLIC The int value representing the public modifier.
int STATIC The int value representing the static modifier.
int STRICT The int value representing the strictfp modifier.
int SYNCHRONIZED The int value representing the synchronized modifier.
int TRANSIENT The int value representing the transient modifier.
int VOLATILE The int value representing the volatile modifier.
Public Constructors
Modifier()
Constructs a new Modifier instance.
Public Methods
static int classModifiers()
Returns a mask of all the modifiers that may be applied to classes.
static int constructorModifiers()
Returns a mask of all the modifiers that may be applied to constructors.
static int fieldModifiers()
Returns a mask of all the modifiers that may be applied to fields.
static int interfaceModifiers()
Returns a mask of all the modifiers that may be applied to interfaces.
static boolean isAbstract(int modifiers)
Returns true if the given modifiers contain ABSTRACT.
static boolean isFinal(int modifiers)
Returns true if the given modifiers contain FINAL.
static boolean isInterface(int modifiers)
Returns true if the given modifiers contain INTERFACE.
static boolean isNative(int modifiers)
Returns true if the given modifiers contain NATIVE.
static boolean isPrivate(int modifiers)
Returns true if the given modifiers contain PRIVATE.
static boolean isProtected(int modifiers)
Returns true if the given modifiers contain PROTECTED.
static boolean isPublic(int modifiers)
Returns true if the given modifiers contain PUBLIC.
static boolean isStatic(int modifiers)
Returns true if the given modifiers contain STATIC.
static boolean isStrict(int modifiers)
Returns true if the given modifiers contain STRICT.
static boolean isSynchronized(int modifiers)
Returns true if the given modifiers contain SYNCHRONIZED.
static boolean isTransient(int modifiers)
Returns true if the given modifiers contain TRANSIENT.
static boolean isVolatile(int modifiers)
Returns true if the given modifiers contain VOLATILE.
static int methodModifiers()
Returns a mask of all the modifiers that may be applied to methods.
static String toString(int modifiers)
Returns a string containing the string representation of all modifiers present in the specified modifiers.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ABSTRACT

Added in API level 1

The int value representing the abstract modifier.

Constant Value: 1024 (0x00000400)

public static final int FINAL

Added in API level 1

The int value representing the final modifier.

Constant Value: 16 (0x00000010)

public static final int INTERFACE

Added in API level 1

The int value representing the interface modifier.

Constant Value: 512 (0x00000200)

public static final int NATIVE

Added in API level 1

The int value representing the native modifier.

Constant Value: 256 (0x00000100)

public static final int PRIVATE

Added in API level 1

The int value representing the private modifier.

Constant Value: 2 (0x00000002)

public static final int PROTECTED

Added in API level 1

The int value representing the protected modifier.

Constant Value: 4 (0x00000004)

public static final int PUBLIC

Added in API level 1

The int value representing the public modifier.

Constant Value: 1 (0x00000001)

public static final int STATIC

Added in API level 1

The int value representing the static modifier.

Constant Value: 8 (0x00000008)

public static final int STRICT

Added in API level 1

The int value representing the strictfp modifier.

Constant Value: 2048 (0x00000800)

public static final int SYNCHRONIZED

Added in API level 1

The int value representing the synchronized modifier.

Constant Value: 32 (0x00000020)

public static final int TRANSIENT

Added in API level 1

The int value representing the transient modifier.

Constant Value: 128 (0x00000080)

public static final int VOLATILE

Added in API level 1

The int value representing the volatile modifier.

Constant Value: 64 (0x00000040)

Public Constructors

public Modifier ()

Added in API level 1

Constructs a new Modifier instance.

Public Methods

public static int classModifiers ()

Added in API level 19

Returns a mask of all the modifiers that may be applied to classes.

public static int constructorModifiers ()

Added in API level 19

Returns a mask of all the modifiers that may be applied to constructors.

public static int fieldModifiers ()

Added in API level 19

Returns a mask of all the modifiers that may be applied to fields.

public static int interfaceModifiers ()

Added in API level 19

Returns a mask of all the modifiers that may be applied to interfaces.

public static boolean isAbstract (int modifiers)

Added in API level 1

Returns true if the given modifiers contain ABSTRACT.

public static boolean isFinal (int modifiers)

Added in API level 1

Returns true if the given modifiers contain FINAL.

public static boolean isInterface (int modifiers)

Added in API level 1

Returns true if the given modifiers contain INTERFACE.

public static boolean isNative (int modifiers)

Added in API level 1

Returns true if the given modifiers contain NATIVE.

public static boolean isPrivate (int modifiers)

Added in API level 1

Returns true if the given modifiers contain PRIVATE.

public static boolean isProtected (int modifiers)

Added in API level 1

Returns true if the given modifiers contain PROTECTED.

public static boolean isPublic (int modifiers)

Added in API level 1

Returns true if the given modifiers contain PUBLIC.

public static boolean isStatic (int modifiers)

Added in API level 1

Returns true if the given modifiers contain STATIC.

public static boolean isStrict (int modifiers)

Added in API level 1

Returns true if the given modifiers contain STRICT.

public static boolean isSynchronized (int modifiers)

Added in API level 1

Returns true if the given modifiers contain SYNCHRONIZED.

public static boolean isTransient (int modifiers)

Added in API level 1

Returns true if the given modifiers contain TRANSIENT.

public static boolean isVolatile (int modifiers)

Added in API level 1

Returns true if the given modifiers contain VOLATILE.

public static int methodModifiers ()

Added in API level 19

Returns a mask of all the modifiers that may be applied to methods.

public static String toString (int modifiers)

Added in API level 1

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.