|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.bytecode.Type
public abstract class Type
Field Summary | |
---|---|
static ClassType |
boolean_ctype
|
static PrimType |
boolean_type
|
static Method |
booleanValue_method
|
static PrimType |
byte_type
|
static PrimType |
char_type
|
static PrimType |
double_type
|
static Method |
doubleValue_method
|
static PrimType |
float_type
|
static Method |
floatValue_method
|
static PrimType |
int_type
|
static Method |
intValue_method
|
static ClassType |
java_lang_Class_type
|
static PrimType |
long_type
|
static Method |
longValue_method
|
static PrimType |
neverReturnsType
The "return type" of an expression that never returns, such as a throw. |
static ObjectType |
nullType
The magic type of null. |
static ClassType |
number_type
|
static ClassType |
pointer_type
|
protected java.lang.Class |
reflectClass
|
static PrimType |
short_type
|
static ClassType |
string_type
|
static ClassType |
throwable_type
|
static Method |
toString_method
|
static ClassType |
tostring_type
|
static Type[] |
typeArray0
|
static PrimType |
void_type
|
Constructor Summary | |
---|---|
protected |
Type()
|
Method Summary | |
---|---|
abstract java.lang.Object |
coerceFromObject(java.lang.Object obj)
Convert an object to a value of this Type. |
java.lang.Object |
coerceToObject(java.lang.Object obj)
|
abstract int |
compare(Type other)
Return a numeric code showing "subtype" relationship: 1: if other is a pure subtype of this; 0: if has the same values; -1: if this is a pure subtype of other; -2: if they have values in common but neither is a subtype of the other; -3: if the types have no values in common. |
void |
emitCoerceFromObject(CodeAttr code)
Compile code to coerce/convert from Object to this type. |
void |
emitCoerceToObject(CodeAttr code)
Compile code to convert a object of this type on the stack to Object. |
void |
emitIsInstance(CodeAttr code)
|
Type |
getImplementationType()
The type used to implement types not natively understood by the JVM. |
java.lang.String |
getName()
|
java.lang.Class |
getReflectClass()
Get the java.lang.Class object for the representation type. |
java.lang.String |
getSignature()
|
int |
getSize()
|
static Type |
getType(java.lang.String name)
Find an Type with the given name, or create a new one. |
int |
hashCode()
|
boolean |
isInstance(java.lang.Object obj)
|
static boolean |
isMoreSpecific(Type[] t1,
Type[] t2)
Return true iff t1[i].isSubtype(t2[i]) for all i. |
boolean |
isSubtype(Type other)
Return true if this is a "subtype" of other. |
static boolean |
isValidJavaTypeName(java.lang.String name)
|
boolean |
isVoid()
|
static Type |
lookupType(java.lang.String name)
|
static Type |
lowestCommonSuperType(Type t1,
Type t2)
Computes the common supertype Interfaces are not taken into account. |
static Type |
make(java.lang.Class reflectClass)
|
Type |
promote()
|
static void |
registerTypeForClass(java.lang.Class clas,
Type type)
Register that the Type for class is type. |
protected void |
setName(java.lang.String name)
|
void |
setReflectClass(java.lang.Class rclass)
|
protected void |
setSignature(java.lang.String sig)
|
static int |
signatureLength(java.lang.String sig)
|
static int |
signatureLength(java.lang.String sig,
int pos)
Return the length of the signature starting at a given string position. |
static java.lang.String |
signatureToName(java.lang.String sig)
Returns the Java-level type name from a given signature. |
static PrimType |
signatureToPrimitive(char sig)
Returns the primitive type corresponding to a signature character. |
static Type |
signatureToType(java.lang.String sig)
Get a Type corresponding to the given signature string. |
static Type |
signatureToType(java.lang.String sig,
int off,
int len)
Get a Type corresponding to the given signature string. |
protected static int |
swappedCompareResult(int code)
Change result from compare to compensate for argument swapping. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PrimType byte_type
public static final PrimType short_type
public static final PrimType int_type
public static final PrimType long_type
public static final PrimType float_type
public static final PrimType double_type
public static final PrimType boolean_type
public static final PrimType char_type
public static final PrimType void_type
public static final PrimType neverReturnsType
public static final ObjectType nullType
public static ClassType string_type
public static final ClassType tostring_type
public static final ClassType pointer_type
public static final ClassType boolean_ctype
public static final ClassType throwable_type
public static final Type[] typeArray0
public static final Method toString_method
public static final ClassType number_type
public static final Method intValue_method
public static final Method longValue_method
public static final Method floatValue_method
public static final Method doubleValue_method
public static final Method booleanValue_method
public static final ClassType java_lang_Class_type
protected java.lang.Class reflectClass
Constructor Detail |
---|
protected Type()
Method Detail |
---|
public Type getImplementationType()
public static Type lookupType(java.lang.String name)
public static Type getType(java.lang.String name)
name
- the name of the class (e..g. "java.lang.String").public static void registerTypeForClass(java.lang.Class clas, Type type)
public static Type make(java.lang.Class reflectClass)
public final java.lang.String getSignature()
protected void setSignature(java.lang.String sig)
public Type promote()
public final int getSize()
public final boolean isVoid()
public static PrimType signatureToPrimitive(char sig)
public static Type signatureToType(java.lang.String sig, int off, int len)
public static Type signatureToType(java.lang.String sig)
public static int signatureLength(java.lang.String sig, int pos)
public static int signatureLength(java.lang.String sig)
public static java.lang.String signatureToName(java.lang.String sig)
public final java.lang.String getName()
protected void setName(java.lang.String name)
public static boolean isValidJavaTypeName(java.lang.String name)
public boolean isInstance(java.lang.Object obj)
public final boolean isSubtype(Type other)
public static Type lowestCommonSuperType(Type t1, Type t2)
public abstract int compare(Type other)
protected static int swappedCompareResult(int code)
public static boolean isMoreSpecific(Type[] t1, Type[] t2)
public void emitIsInstance(CodeAttr code)
public abstract java.lang.Object coerceFromObject(java.lang.Object obj)
public java.lang.Object coerceToObject(java.lang.Object obj)
public void emitCoerceToObject(CodeAttr code)
public void emitCoerceFromObject(CodeAttr code)
public java.lang.Class getReflectClass()
public void setReflectClass(java.lang.Class rclass)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |