public class MappedArrayType extends ObjectType implements TypeValue
Type.NeverReturns
Modifier and Type | Field and Description |
---|---|
protected ObjectType |
implementationType |
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
Constructor and Description |
---|
MappedArrayType(Type elementType) |
Modifier and Type | Method and Description |
---|---|
Expression |
convertValue(Expression value)
Return converted expression or null.
|
void |
emitCoerceFromObject(CodeAttr code)
Compile (in given method) cast from Object to this Type.
|
void |
emitIsInstance(Variable incoming,
Compilation comp,
Target target)
Emit code for incoming instanceof this_type.
|
void |
emitTestIf(Variable incoming,
Declaration decl,
Compilation comp)
Emit code for
if (incoming instanceof this_type) decl = incoming ....
|
java.lang.String |
encodeType(Language language) |
Type |
getComponentType() |
Procedure |
getConstructor()
Get the constructor function for this type.
|
Type |
getImplementationType()
Return Java-level implementation type.
|
java.lang.String |
getName() |
Type |
getRealType()
If this is a type alias, get the aliased type.
|
int |
isCompatibleWithValue(Type valueType)
If this is the target type, is a given source type compatible?
|
static Type |
maybe(Type type,
int nesting) |
java.lang.String |
toString() |
coerceFromObject, compare, getContextClass, getContextClassLoader, getField, getInterfaces, getInternalName, getMethod, getMethods, getMethods, getReflectClass, getSuperclass, isExisting, isInstance, setExisting
coerceToObject, emitCoerceToObject, emitConvertFromPrimitive, emitIsInstance, getGenericSignature, getMaybeGenericSignature, getRawType, getSignature, getSize, getSizeInWords, getType, hashCode, 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
protected ObjectType implementationType
public MappedArrayType(Type elementType)
public Type getComponentType()
public Type getImplementationType()
Type
getImplementationType
in interface TypeValue
getImplementationType
in class Type
public Type getRealType()
Type
getRealType
in class Type
public void emitTestIf(Variable incoming, Declaration decl, Compilation comp)
TypeValue
emitTestIf
in interface TypeValue
incoming
- Contains the value we are testing to see if it has the
type of this. If null, use top-of-stack.
May not be null if decl is non-null.decl
- If non-null, assign value after coercion to Declaration.comp
- The compilation state.public int isCompatibleWithValue(Type valueType)
Type
isCompatibleWithValue
in class Type
public Expression convertValue(Expression value)
TypeValue
convertValue
in interface TypeValue
public Procedure getConstructor()
TypeValue
<init>
methods) should be used.getConstructor
in interface TypeValue
public void emitIsInstance(Variable incoming, Compilation comp, Target target)
TypeValue
InstanceOf
.emitIsInstance
which is a conveniece method that calls
emitTestIf
.emitIsInstance
in interface TypeValue
incoming
- Contains the value we are testing to see if it has the
the type of 'this'. If null, use top-of-stack.comp
- The compilation state.target
- Where to leave the result.public java.lang.String encodeType(Language language)
encodeType
in interface TypeValue
public void emitCoerceFromObject(CodeAttr code)
ObjectType
emitCoerceFromObject
in class ObjectType