public abstract class ObjectType extends Type
Extended by ClassType and ArrayType.
Type.NeverReturns
Modifier and Type | Field and Description |
---|---|
int |
flags |
boolean_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 |
ObjectType() |
|
ObjectType(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
coerceFromObject(java.lang.Object obj)
Convert an object to a value of this Type.
|
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 (in given method) cast from Object to this Type.
|
static java.lang.Class |
getContextClass(java.lang.String cname)
Get named class using context class loader.
|
static java.lang.ClassLoader |
getContextClassLoader() |
Field |
getField(java.lang.String name,
int mask) |
ClassType[] |
getInterfaces() |
java.lang.String |
getInternalName()
Returns class name if a class type, signature if an array type.
|
Method |
getMethod(java.lang.String name,
Type[] arg_types) |
int |
getMethods(Filter filter,
int searchSupers,
java.util.List<Method> result) |
int |
getMethods(Filter filter,
int searchSupers,
java.util.Vector result,
java.lang.String context)
Deprecated.
|
java.lang.Class |
getReflectClass()
Get the java.lang.Class object for the representation type.
|
ClassType |
getSuperclass() |
boolean |
isExisting() |
boolean |
isInstance(java.lang.Object obj) |
void |
setExisting(boolean existing) |
coerceToObject, emitCoerceToObject, emitConvertFromPrimitive, emitIsInstance, getGenericSignature, getImplementationType, getMaybeGenericSignature, getName, getRawType, getRealType, getSignature, getSize, getSizeInWords, getType, hashCode, isCompatibleWithValue, isCompatibleWithValue, isInterface, isMoreSpecific, isSame, isSubtype, isValidJavaTypeName, isVoid, lookupType, lowestCommonSharedType, lowestCommonSuperType, make, make, printSignature, promote, promoteIfUnsigned, registerTypeForClass, setGenericSignature, setName, setReflectClass, setSignature, signatureLength, signatureLength, signatureToName, signatureToPrimitive, signatureToType, signatureToType, swappedCompareResult, toString
protected ObjectType()
public ObjectType(java.lang.String name)
public final boolean isExisting()
isExisting
in class Type
public final void setExisting(boolean existing)
public java.lang.String getInternalName()
public static java.lang.Class getContextClass(java.lang.String cname) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.lang.ClassLoader getContextClassLoader()
public java.lang.Class getReflectClass()
getReflectClass
in class Type
public boolean isInstance(java.lang.Object obj)
isInstance
in class Type
public ClassType getSuperclass()
public ClassType[] getInterfaces()
public Field getField(java.lang.String name, int mask)
@Deprecated public final int getMethods(Filter filter, int searchSupers, java.util.Vector result, java.lang.String context)
public int compare(Type other)
Type
public java.lang.Object coerceFromObject(java.lang.Object obj)
Type
coerceFromObject
in class Type
public void emitCoerceFromObject(CodeAttr code)
emitCoerceFromObject
in class Type