public class PrimType extends Type
Type.NeverReturnsboolean_ctype, boolean_type, booleanType, booleanValue_method, byte_type, byteType, char_type, charType, clone_method, double_type, doubleType, doubleValue_method, errorType, float_type, floatType, floatValue_method, int_type, intType, intValue_method, java_lang_Class_type, javalangannotationAnnotationType, javalangBooleanType, javalangCharacterType, javalangClassType, javalanginvokeMethodHandleType, javalangNumberType, javalangObjectType, javalangStringType, javalangThrowableType, long_type, longType, longValue_method, neverReturnsType, nullType, number_type, objectType, pointer_type, reflectClass, short_type, shortType, string_type, throwable_type, toString_method, tostring_type, toStringType, typeArray0, void_type, voidType| Modifier | Constructor and Description |
|---|---|
protected |
PrimType(PrimType type) |
|
PrimType(java.lang.String nam,
java.lang.String sig,
int siz,
java.lang.Class reflectClass) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
booleanValue(java.lang.Object value)
Coerce value to a boolean.
|
ClassType |
boxedType() |
char |
charValue(java.lang.Object value)
Coerce value to a char.
|
java.lang.Object |
coerceFromObject(java.lang.Object obj)
Convert an object to a value of this Type.
|
static int |
compare(PrimType type1,
PrimType type2) |
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.
|
java.lang.Object |
convertToRaw(java.lang.Object obj) |
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) |
boolean |
isUnsigned() |
Type |
promotedType() |
static PrimType |
unboxedType(Type type) |
coerceToObject, emitConvertFromPrimitive, getGenericSignature, getImplementationType, getMaybeGenericSignature, getName, getRawType, getRealType, getReflectClass, getSignature, getSize, getSizeInWords, getType, hashCode, isCompatibleWithValue, isCompatibleWithValue, isExisting, isInstance, isInterface, isMoreSpecific, isSubtype, isValidJavaTypeName, isVoid, lookupType, lowestCommonSuperType, make, make, printSignature, promote, registerTypeForClass, setGenericSignature, setName, setReflectClass, setSignature, signatureLength, signatureLength, signatureToName, signatureToPrimitive, signatureToType, signatureToType, swappedCompareResult, toStringpublic PrimType(java.lang.String nam,
java.lang.String sig,
int siz,
java.lang.Class reflectClass)
protected PrimType(PrimType type)
public boolean isUnsigned()
public java.lang.Object coerceFromObject(java.lang.Object obj)
TypecoerceFromObject in class Typepublic java.lang.Object convertToRaw(java.lang.Object obj)
public char charValue(java.lang.Object value)
public static boolean booleanValue(java.lang.Object value)
public ClassType boxedType()
public void emitCoerceToObject(CodeAttr code)
TypeemitCoerceToObject in class Typepublic void emitIsInstance(CodeAttr code)
emitIsInstance in class Typepublic void emitCoerceFromObject(CodeAttr code)
TypeemitCoerceFromObject in class Typepublic Type promotedType()
public int compare(Type other)
Type