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

Constructor Index

 o MetaClass()

Method Index

 o access()
access フラグを返す。(uint16)
 o classBySignature(String, ClassLoader)
signature から対応するクラスを得る。
 o classClass()
java.lang.Classを返す。
 o classfileLength()
ClassWriter で生成されるクラスファイルの長さを返す。
 o constantpoolCount()
constantpool count を返す。(uint16)
 o defineClass(ClassLoader, String, byte[], int, int)
クラスを定義する。
このメソッドは将来なくす予定。
 o doesImplement(Class)
implementsしているか調べる。
 o field(int)
クラス中で与えられたインデックスを持つフィールドを得る。
 o field(String)
与えられたフィールド名を持つフィールドを得る。
 o fieldCount()
フィールド数を返す。(uint16)
 o get(Class)
 o get(Object)
 o get(String)
 o get(String, ClassLoader)
 o getBySignature(String)
 o getBySignature(String, ClassLoader)
 o getName()
クラス名を返す。
 o hasOwnReadObject()
自前のreadObject()を持っているか。
 o hasOwnWriteObject()
自前のwriteObject()を持っているか。
 o interfaceCount()
interface count を返す。(uint16)
 o isArray()
配列のクラスなら真を返す。
JDK 1.1 以降の java.lang.Class#isArray() と同等のメソッド。
 o isBaseTypeArray()
基本型 (byte, char, int, ...) の配列なら真を返す。
 o isObjectArray()
オブジェクト (or 配列) のクラスなら真を返す。
 o isStreamable()
Streamableをimplementsしているか調べる。
 o magicNumber()
magic number を返す。
 o majorVersion()
major version を返す。(uint16)
 o method(int)
クラス中で与えられたインデックスを持つメソッドを得る。
 o method(String, String)
与えられたセレクタ (メソッド名とsignatureの組) を持つメソッドを得る。
 o methodCount()
メソッド数を返す。(uint16)
 o minorVersion()
minor version を返す。(uint16)
 o nativeMethodCount()
native methods の数を返す。
 o newInstance()
このクラスのインスタンスを作成する。
配列の作成には newInstance(int) を使う。
 o newInstance(int)
この (配列) クラスのインスタンスを作成する。
 o referringClassnames()
このクラスが必要とするクラス群を返す。
 o referringClassnames(Class[])
引数のクラス群が必要とするクラス群を コンスタントプールから静的に得、名前で返す。
java.*, sun.* は除き、superclass から順に。
 o signature()
signature を返す。
 o sourceName()
ソースファイル名を返す。
 o staticMethodCount()
static methods の数を返す。
 o superClass()
super class を返す。
 o toString()
 o writeIFInClassfile(OutputStream)
classfile のフォーマットで interface を出力する。

Constructors

 o MetaClass
 public MetaClass()

Methods

 o get
 public static MetaClass get(Class thisClass)
 o get
 public static MetaClass get(String className,
                             ClassLoader loader) throws ClassNotFoundException
 o get
 public static MetaClass get(String className) throws ClassNotFoundException
 o get
 public static MetaClass get(Object obj)
 o getBySignature
 public static MetaClass getBySignature(String signature,
                                        ClassLoader loader) throws ClassNotFoundException
 o getBySignature
 public static MetaClass getBySignature(String signature) throws ClassNotFoundException
 o toString
 public String toString()
Overrides:
toString in class Object
 o classClass
 public Class classClass()
java.lang.Classを返す。

 o getName
 public String getName()
クラス名を返す。

 o signature
 public native String signature()
signature を返す。

 o classBySignature
 protected static native Class classBySignature(String signature,
                                                ClassLoader loader) throws ClassNotFoundException
signature から対応するクラスを得る。

 o newInstance
 public Object newInstance()
このクラスのインスタンスを作成する。
配列の作成には newInstance(int) を使う。

 o newInstance
 public Object newInstance(int len)
この (配列) クラスのインスタンスを作成する。

 o field
 public MetaField field(int i) throws FieldNotFoundException
クラス中で与えられたインデックスを持つフィールドを得る。

 o method
 public MetaMethod method(int i) throws FieldNotFoundException
クラス中で与えられたインデックスを持つメソッドを得る。

 o field
 public MetaField field(String name) throws FieldNotFoundException
与えられたフィールド名を持つフィールドを得る。

 o method
 public MetaMethod method(String name,
                          String sig) throws FieldNotFoundException
与えられたセレクタ (メソッド名とsignatureの組) を持つメソッドを得る。

 o isArray
 public boolean isArray()
配列のクラスなら真を返す。
JDK 1.1 以降の java.lang.Class#isArray() と同等のメソッド。

 o isObjectArray
 public boolean isObjectArray()
オブジェクト (or 配列) のクラスなら真を返す。

 o isBaseTypeArray
 public boolean isBaseTypeArray()
基本型 (byte, char, int, ...) の配列なら真を返す。

 o defineClass
 public static native Class defineClass(ClassLoader loader,
                                        String name,
                                        byte data[],
                                        int offset,
                                        int length)
クラスを定義する。
このメソッドは将来なくす予定。

 o referringClassnames
 public String[] referringClassnames()
このクラスが必要とするクラス群を返す。

 o referringClassnames
 public static String[] referringClassnames(Class clazzes[])
引数のクラス群が必要とするクラス群を コンスタントプールから静的に得、名前で返す。
java.*, sun.* は除き、superclass から順に。

 o hasOwnWriteObject
 public boolean hasOwnWriteObject()
自前のwriteObject()を持っているか。

 o hasOwnReadObject
 public boolean hasOwnReadObject()
自前のreadObject()を持っているか。

 o doesImplement
 public boolean doesImplement(Class iface)
implementsしているか調べる。

 o isStreamable
 public boolean isStreamable()
Streamableをimplementsしているか調べる。

 o superClass
 public MetaClass superClass()
super class を返す。

 o magicNumber
 public static native int magicNumber()
magic number を返す。

 o majorVersion
 public native int majorVersion()
major version を返す。(uint16)

 o minorVersion
 public native int minorVersion()
minor version を返す。(uint16)

 o constantpoolCount
 public int constantpoolCount()
constantpool count を返す。(uint16)

 o access
 public native int access()
access フラグを返す。(uint16)

 o fieldCount
 public native int fieldCount()
フィールド数を返す。(uint16)

 o methodCount
 public native int methodCount()
メソッド数を返す。(uint16)

 o interfaceCount
 public native int interfaceCount()
interface count を返す。(uint16)

 o nativeMethodCount
 public int nativeMethodCount()
native methods の数を返す。

 o staticMethodCount
 public int staticMethodCount()
static methods の数を返す。

 o writeIFInClassfile
 public native void writeIFInClassfile(OutputStream out) throws IOException
classfile のフォーマットで interface を出力する。

 o sourceName
 public native String sourceName()
ソースファイル名を返す。

 o classfileLength
 public long classfileLength()
ClassWriter で生成されるクラスファイルの長さを返す。


All Packages  Class Hierarchy  This Package  Previous  Next  Index