All Packages Class Hierarchy This Package Previous Next Index
Class NET.shudo.moba.reflect.MetaClass
java.lang.Object
|
+----NET.shudo.moba.reflect.MetaClass
- public final class MetaClass
- extends Object
-
MetaClass()
-
-
access()
- access フラグを返す。(uint16)
-
classBySignature(String, ClassLoader)
- signature から対応するクラスを得る。
-
classClass()
- java.lang.Classを返す。
-
classfileLength()
- ClassWriter で生成されるクラスファイルの長さを返す。
-
constantpoolCount()
- constantpool count を返す。(uint16)
-
defineClass(ClassLoader, String, byte[], int, int)
- クラスを定義する。
このメソッドは将来なくす予定。
-
doesImplement(Class)
- implementsしているか調べる。
-
field(int)
- クラス中で与えられたインデックスを持つフィールドを得る。
-
field(String)
- 与えられたフィールド名を持つフィールドを得る。
-
fieldCount()
- フィールド数を返す。(uint16)
-
get(Class)
-
-
get(Object)
-
-
get(String)
-
-
get(String, ClassLoader)
-
-
getBySignature(String)
-
-
getBySignature(String, ClassLoader)
-
-
getName()
- クラス名を返す。
-
hasOwnReadObject()
- 自前のreadObject()を持っているか。
-
hasOwnWriteObject()
- 自前のwriteObject()を持っているか。
-
interfaceCount()
- interface count を返す。(uint16)
-
isArray()
- 配列のクラスなら真を返す。
JDK 1.1 以降の java.lang.Class#isArray() と同等のメソッド。
-
isBaseTypeArray()
- 基本型 (byte, char, int, ...) の配列なら真を返す。
-
isObjectArray()
- オブジェクト (or 配列) のクラスなら真を返す。
-
isStreamable()
- Streamableをimplementsしているか調べる。
-
magicNumber()
- magic number を返す。
-
majorVersion()
- major version を返す。(uint16)
-
method(int)
- クラス中で与えられたインデックスを持つメソッドを得る。
-
method(String, String)
- 与えられたセレクタ (メソッド名とsignatureの組) を持つメソッドを得る。
-
methodCount()
- メソッド数を返す。(uint16)
-
minorVersion()
- minor version を返す。(uint16)
-
nativeMethodCount()
- native methods の数を返す。
-
newInstance()
- このクラスのインスタンスを作成する。
配列の作成には newInstance(int) を使う。
-
newInstance(int)
- この (配列) クラスのインスタンスを作成する。
-
referringClassnames()
- このクラスが必要とするクラス群を返す。
-
referringClassnames(Class[])
- 引数のクラス群が必要とするクラス群を
コンスタントプールから静的に得、名前で返す。
java.*, sun.* は除き、superclass から順に。
-
signature()
- signature を返す。
-
sourceName()
- ソースファイル名を返す。
-
staticMethodCount()
- static methods の数を返す。
-
superClass()
- super class を返す。
-
toString()
-
-
writeIFInClassfile(OutputStream)
- classfile のフォーマットで interface を出力する。
MetaClass
public MetaClass()
get
public static MetaClass get(Class thisClass)
get
public static MetaClass get(String className,
ClassLoader loader) throws ClassNotFoundException
get
public static MetaClass get(String className) throws ClassNotFoundException
get
public static MetaClass get(Object obj)
getBySignature
public static MetaClass getBySignature(String signature,
ClassLoader loader) throws ClassNotFoundException
getBySignature
public static MetaClass getBySignature(String signature) throws ClassNotFoundException
toString
public String toString()
- Overrides:
- toString in class Object
classClass
public Class classClass()
- java.lang.Classを返す。
getName
public String getName()
- クラス名を返す。
signature
public native String signature()
- signature を返す。
classBySignature
protected static native Class classBySignature(String signature,
ClassLoader loader) throws ClassNotFoundException
- signature から対応するクラスを得る。
newInstance
public Object newInstance()
- このクラスのインスタンスを作成する。
配列の作成には newInstance(int) を使う。
newInstance
public Object newInstance(int len)
- この (配列) クラスのインスタンスを作成する。
field
public MetaField field(int i) throws FieldNotFoundException
- クラス中で与えられたインデックスを持つフィールドを得る。
method
public MetaMethod method(int i) throws FieldNotFoundException
- クラス中で与えられたインデックスを持つメソッドを得る。
field
public MetaField field(String name) throws FieldNotFoundException
- 与えられたフィールド名を持つフィールドを得る。
method
public MetaMethod method(String name,
String sig) throws FieldNotFoundException
- 与えられたセレクタ (メソッド名とsignatureの組) を持つメソッドを得る。
isArray
public boolean isArray()
- 配列のクラスなら真を返す。
JDK 1.1 以降の java.lang.Class#isArray() と同等のメソッド。
isObjectArray
public boolean isObjectArray()
- オブジェクト (or 配列) のクラスなら真を返す。
isBaseTypeArray
public boolean isBaseTypeArray()
- 基本型 (byte, char, int, ...) の配列なら真を返す。
defineClass
public static native Class defineClass(ClassLoader loader,
String name,
byte data[],
int offset,
int length)
- クラスを定義する。
このメソッドは将来なくす予定。
referringClassnames
public String[] referringClassnames()
- このクラスが必要とするクラス群を返す。
referringClassnames
public static String[] referringClassnames(Class clazzes[])
- 引数のクラス群が必要とするクラス群を
コンスタントプールから静的に得、名前で返す。
java.*, sun.* は除き、superclass から順に。
hasOwnWriteObject
public boolean hasOwnWriteObject()
- 自前のwriteObject()を持っているか。
hasOwnReadObject
public boolean hasOwnReadObject()
- 自前のreadObject()を持っているか。
doesImplement
public boolean doesImplement(Class iface)
- implementsしているか調べる。
isStreamable
public boolean isStreamable()
- Streamableをimplementsしているか調べる。
superClass
public MetaClass superClass()
- super class を返す。
magicNumber
public static native int magicNumber()
- magic number を返す。
majorVersion
public native int majorVersion()
- major version を返す。(uint16)
minorVersion
public native int minorVersion()
- minor version を返す。(uint16)
constantpoolCount
public int constantpoolCount()
- constantpool count を返す。(uint16)
access
public native int access()
- access フラグを返す。(uint16)
fieldCount
public native int fieldCount()
- フィールド数を返す。(uint16)
methodCount
public native int methodCount()
- メソッド数を返す。(uint16)
interfaceCount
public native int interfaceCount()
- interface count を返す。(uint16)
nativeMethodCount
public int nativeMethodCount()
- native methods の数を返す。
staticMethodCount
public int staticMethodCount()
- static methods の数を返す。
writeIFInClassfile
public native void writeIFInClassfile(OutputStream out) throws IOException
- classfile のフォーマットで interface を出力する。
sourceName
public native String sourceName()
- ソースファイル名を返す。
classfileLength
public long classfileLength()
- ClassWriter で生成されるクラスファイルの長さを返す。
All Packages Class Hierarchy This Package Previous Next Index