加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090315042251/http://developer.android.com:80/reference/java/lang/reflect/Modifier.html
public class

Modifier

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

Class Overview

This class provides methods to decode class and member modifiers.

Summary

Constants
int ABSTRACT
int FINAL
int INTERFACE
int NATIVE
int PRIVATE
int PROTECTED
int PUBLIC
int STATIC
int STRICT
int SYNCHRONIZED
int TRANSIENT
int VOLATILE
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.
[Expand]
Inherited Methods
From class java.lang.Object

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