所有类


java.lang.reflect
类 Modifier

java.lang.Object
  继承者 java.lang.reflect.Modifier

public class Modifier
   
   
   
   
   
extends Object

Modifier 类提供了 static 方法和常量,对类和成员访问修饰符进行解码。修饰符集被表示为整数,用不同的位位置 (bit position) 表示不同的修饰符。表示修饰符的常量值来自于 The JavaTMVirtual Machine Specification, Second edition 的表 4.14.44.54.7

另请参见:
Class.getModifiers(), Member.getModifiers()

字段摘要
static intABSTRACT
          表示 abstract 修饰符的 int 的值。
static intFINAL
          表示 final 修饰符的 int 值。
static intINTERFACE
          表示 interface 修饰符的 int 的值。
static intNATIVE
          表示 native 修饰符的 int 的值。
static intPRIVATE
          表示 private 修饰符的 int 值。
static intPROTECTED
          表示 protected 修饰符的 int 值。
static intPUBLIC
          表示 public 修饰符的 int 值。
static intSTATIC
          表示 static 修饰符的 int 值。
static intSTRICT
          表示 strictfp 修饰符的 int 的值。
static intSYNCHRONIZED
          表示 synchronized 修饰符的 int 值。
static intTRANSIENT
          表示 transient 修饰符的 int 的值。
static intVOLATILE
          表示 volatile 修饰符的 int 值。
 
构造方法摘要
Modifier()
           
 
方法摘要
static booleanisAbstract(int mod)
          如果整数参数包括 abstract 修饰符,则返回 true,否则返回 false
static booleanisFinal(int mod)
          如果整数参数包括 final 修饰符,则返回 true,否则返回 false
static booleanisInterface(int mod)
          如果整数参数包括 interface 修饰符,则返回 true,否则返回 false
static booleanisNative(int mod)
          如果整数参数包括 native 修饰符,则返回 true,否则返回 false
static booleanisPrivate(int mod)
          如果整数参数包括 private 修饰符,则返回 true,否则返回 false
static booleanisProtected(int mod)
          如果整数参数包括 protected 修饰符,则返回 true,否则返回 false
static booleanisPublic(int mod)
          如果整数参数包括 public 修饰符,则返回 true,否则返回 false
static booleanisStatic(int mod)
          如果整数参数包括 static 修饰符,则返回 true,否则返回 false
static booleanisStrict(int mod)
          如果整数参数包括 strictfp 修饰符,则返回 true,否则返回 false
static booleanisSynchronized(int mod)
          如果整数参数包括 synchronized 修饰符,则返回 true,否则返回 false
static booleanisTransient(int mod)
          如果整数参数包括 transient 修饰符,则返回 true,否则返回 false
static booleanisVolatile(int mod)
          如果整数参数包括 volatile 修饰符,则返回 true,否则返回 false
static StringtoString(int mod)
          返回描述指定修饰符中的访问修饰符标志的字符串。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

PUBLIC

public static final int PUBLIC
表示 public 修饰符的 int 值。

另请参见:
常量字段值

PRIVATE

public static final int PRIVATE
表示 private 修饰符的 int 值。

另请参见:
常量字段值

PROTECTED

public static final int PROTECTED
表示 protected 修饰符的 int 值。

另请参见:
常量字段值

STATIC

public static final int STATIC
表示 static 修饰符的 int 值。

另请参见:
常量字段值

FINAL

public static final int FINAL
表示 final 修饰符的 int 值。

另请参见:
常量字段值

SYNCHRONIZED

public static final int SYNCHRONIZED
表示 synchronized 修饰符的 int 值。

另请参见:
常量字段值

VOLATILE

public static final int VOLATILE
表示 volatile 修饰符的 int 值。

另请参见:
常量字段值