public final class Type extends ObjectSE
修飾子と型 | フィールドと説明 |
---|---|
static int | ARRAY 配列参照型の種類。 |
static int | BOOLEAN boolean 型の種類。 |
static Type | BOOLEAN_TYPE boolean 型。 |
static int | BYTE byte 型の種類。 |
static Type | BYTE_TYPE byte 型。 |
static int | CHAR char 型の種類。 |
static Type | CHAR_TYPE char 型。 |
static int | DOUBLE double 型の種類。 |
static Type | DOUBLE_TYPE double 型。 |
static int | FLOAT float 型の種類。 |
static Type | FLOAT_TYPE float 型。 |
static int | INT int 型の種類。 |
static Type | INT_TYPE int 型。 |
static int | LONG long 型の種類。 |
static Type | LONG_TYPE long 型。 |
static int | METHOD メソッドの種類の種類。 |
static int | OBJECT オブジェクト参照型の種類。 |
static int | SHORT short 型の種類。 |
static Type | SHORT_TYPE short 型。 |
static int | VOID void 型の種類。 |
static Type | VOID_TYPE void 型。 |
修飾子と型 | メソッドと説明 |
---|---|
boolean | equals(ObjectSE object) 指定されたオブジェクトがこの型と等しいかどうかをテストします。 |
int | getArgumentsAndReturnSizes() この型のメソッドの引数と戻り値のサイズを返します。 |
static int | getArgumentsAndReturnSizes(StringSE methodDescriptor) メソッドの引数と戻り値のサイズを計算します。 |
Type[] | getArgumentTypes() この型のメソッドの引数の型を返します。 |
static Type[] | getArgumentTypes(MethodSE method) 指定されたメソッドの引数の型に対応する Type 値を返します。 |
static Type[] | getArgumentTypes(StringSE methodDescriptor) 指定されたメソッド記述子の引数の型に対応する Type 値を返します。 |
StringSE | getClassName() この型に対応するクラスのバイナリ名を返します。 |
static StringSE | getConstructorDescriptor(ConstructorSE<?> constructor) 指定されたコンストラクターに対応する記述子を返します。 |
StringSE | getDescriptor() この型に対応する記述子を返します。 |
static StringSE | getDescriptor(ClassSE<?> clazz) 指定されたクラスに対応する記述子を返します。 |
int | getDimensions() この配列型の次元数を返します。 |
Type | getElementType() この配列型の要素の型を返します。 |
StringSE | getInternalName() このオブジェクトまたは配列型に対応するクラスの内部名を返します。 |
static StringSE | getInternalName(ClassSE<?> clazz) 指定されたクラスの内部名を返します。 |
static StringSE | getMethodDescriptor(MethodSE method) 指定されたメソッドに対応する記述子を返します。 |
static StringSE | getMethodDescriptor(Type returnType, Type... argumentTypes) 指定された引数と戻り型に対応する記述子を返します。 |
static Type | getMethodType(StringSE methodDescriptor) 指定されたメソッド記述子に対応する Type を返します。 |
static Type | getMethodType(Type returnType, Type... argumentTypes) 指定された引数と戻り値の型に対応するメソッド Type を返します。 |
static Type | getObjectType(StringSE internalName) 指定された内部名に対応する Type を返します。 |
int | getOpcode(int opcode) この Type に適合した JVM 命令オペコードを返します。 |
Type | getReturnType() この型のメソッドの戻り値の型を戻します。 |
static Type | getReturnType(MethodSE method) 指定されたメソッドの戻り値の型に対応する Type を返します。 |
static Type | getReturnType(StringSE methodDescriptor) 指定されたメソッド記述子の戻り値の型に対応する Type を返します。 |
int | getSize() この型の値のサイズを返します。 |
int | getSort() この型の種類を返します。 |
static Type | getType(ClassSE<?> clazz) 指定されたクラスに対応する Type を返します。 |
static Type | getType(ConstructorSE<?> constructor) 指定されたコンストラクターに対応するメソッド Type を返します。 |
static Type | getType(MethodSE method) 指定されたメソッドに対応するメソッド Type を返します。 |
static Type | getType(StringSE typeDescriptor) 指定された型記述子に対応する Type を返します。 |
int | hashCode() この型のハッシュコード値を返します。 |
StringSE | toString() この型の文字列表現を返します。 |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public static final Type VOID_TYPE
void
型。public static final Type BOOLEAN_TYPE
boolean
型。public static final Type CHAR_TYPE
char
型。public static final Type BYTE_TYPE
byte
型。public static final Type SHORT_TYPE
short
型。public static final Type INT_TYPE
int
型。public static final Type FLOAT_TYPE
float
型。public static final Type LONG_TYPE
long
型。public static final Type DOUBLE_TYPE
double
型。public static Type getType(StringSE typeDescriptor)
Type
を返します。typeDescriptor
- フィールドまたはメソッド型記述子。Type
public static Type getType(ClassSE<?> clazz)
Type
を返します。clazz
- クラス。Type
public static Type getType(ConstructorSE<?> constructor)
Type
を返します。constructor
- Constructor
SE オブジェクト。Type
public Type getElementType()
public static Type getObjectType(StringSE internalName)
Type
を返します。internalName
- 内部名。Type
public static Type getMethodType(StringSE methodDescriptor)
Type
を返します。 Type.getType(methodDescriptor)
と同等です。methodDescriptor
- メソッド記述子。Type
public static Type getMethodType(Type returnType, Type... argumentTypes)
Type
を返します。returnType
- メソッドの戻りの型。argumentTypes
- メソッドの引数の型。Type
public Type[] getArgumentTypes()
public static Type[] getArgumentTypes(StringSE methodDescriptor)
Type
値を返します。methodDescriptor
- メソッド記述子。Type
値。public static Type[] getArgumentTypes(MethodSE method)
Type
値を返します。method
- メソッド。Type
値。public Type getReturnType()
public static Type getReturnType(StringSE methodDescriptor)
Type
を返します。methodDescriptor
- メソッド記述子。Type
public static Type getReturnType(MethodSE method)
Type
を返します。method
- メソッド。Type
public StringSE getClassName()
public StringSE getInternalName()
public static StringSE getInternalName(ClassSE<?> clazz)
clazz
- オブジェクトまたは配列クラス。public StringSE getDescriptor()
public static StringSE getDescriptor(ClassSE<?> clazz)
clazz
- オブジェクトクラス、プリミティブクラス、配列クラス。public static StringSE getConstructorDescriptor(ConstructorSE<?> constructor)
constructor
- Constructor
SE オブジェクト。public static StringSE getMethodDescriptor(Type returnType, Type... argumentTypes)
returnType
- メソッドの戻りの型。argumentTypes
- メソッドの引数の型。public static StringSE getMethodDescriptor(MethodSE method)
method
- Method
SE オブジェクト。public int getSort()
public int getDimensions()
public int getSize()
long
および double
の場合は 2、void
の場合は 0、それ以外の場合は 1。public int getArgumentsAndReturnSizes()
(argumentsSize << 2) | returnSize
にパックされます(argumentsSize は i >> 2
に等しく、returnSize は i & 0x03
に等しい))。public static int getArgumentsAndReturnSizes(StringSE methodDescriptor)
methodDescriptor
- メソッド記述子。(argumentsSize << 2) | returnSize
にパックされます(argumentsSize は i >> 2
に等しく、returnSize は i & 0x03
に等しい))。public int getOpcode(int opcode)
Type
に適合した JVM 命令オペコードを返します。このメソッドはメソッド型には使用できません。opcode
- JVM 命令のオペコード。このオペコードは、ILOAD、ISTORE、IALOAD、IASTORE、IADD、ISUB、IMUL、IDIV、IREM、INEG、ISHL、ISHR、IUSHR、IAND、IOR、IXOR、IRETURN のいずれかである必要があります。Type
に適合したオペコード例: この型が float
で、opcode
が IRETURN の場合、このメソッドは FRETURN を返します。public boolean equals(ObjectSE object)
public int hashCode()
ObjectSE
の hashCodeSE
public StringSE toString()
ObjectSE
の toStringSE