| 目次 | 前項目 | 次項目 | Java コアリフレクション |
package java.lang.reflect;public final class Modifier extends Object
Modifier クラスはインスタンス化できないクラスで、クラスおよびメンバの Java 言語修飾子 (整数型にコード化される) の解読に使う static メソッドおよび定数をエクスポートします。
public final static int PUBLIC
public アクセス修飾子の整数型定数です。 public final static int PRIVATE
private アクセス修飾子の整数型定数です。 public final static int PROTECTED
protected アクセス修飾子の整数型定数です。 public final static int STATIC
static 修飾子の整数型定数です。 public final static int FINAL
final 修飾子の整数型定数です。 public final static int SYNCHRONIZED
synchronized 修飾子の整数型定数です。 public final static int VOLATILE
volatile 修飾子の整数型定数です。 public final static int TRANSIENT
transient 修飾子の整数型定数です。 public final static int NATIVE
native 修飾子の整数型定数です。 public final static int INTERFACE
interface 修飾子の整数型定数です。 public final static int ABSTRACT
abstract 修飾子の整数型定数です。
public static boolean isPublic(int mod)
指定の整数型が public 修飾子を含む場合、true を返します。 public static boolean isPrivate(int mod)
指定の整数型が private 修飾子を含む場合、true を返します。 public static boolean isProtected(int mod)
指定の整数型が protected 修飾子を含む場合、true を返します。 public static boolean isStatic(int mod)
指定の整数型が static 修飾子を含む場合、true を返します。 public static boolean isFinal(int mod)
指定の整数型が final 修飾子を含む場合、true を返します。 public static boolean isSynchronized(int mod)
指定の整数型が synchronized 修飾子を含む場合、true を返します。 public static boolean isVolatile(int mod)
指定の整数型が volatile 修飾子を含む場合、true を返します。 public static boolean isTransient(int mod)
指定の整数型が transient 修飾子を含む場合、true を返します。 public static boolean isNative(int mod)
指定の整数型が native 修飾子を含む場合、true を返します。 public static boolean isInterface(int mod)
指定の整数型が interface 修飾子を含む場合、true を返します。 public static boolean isAbstract(int mod)
指定の整数型が abstract 修飾子を含む場合、true を返します。 public static String toString(int mod)
指定の整数型に含まれる修飾子名を、スペースで区切ったリストが入っている文字列を返します。以下に例を示します:
public final synchronized
private transient volatile
修飾子名は、Java 言語仕様で指定した標準順序で返されます。