java.lang.Object
gnu.bytecode.Type
gnu.bytecode.ObjectType
gnu.bytecode.ArrayType
nice.tools.code.SpecialArray
- Direct Known Subclasses:
- TupleType
- public class SpecialArray
- extends gnu.bytecode.ArrayType
Arrays that are wrapped on the fly into objects implementing java.util.List
when needed.
| Fields inherited from class gnu.bytecode.Type |
boolean_ctype, boolean_type, booleanValue_method, byte_type, char_type, double_type, doubleValue_method, float_type, floatValue_method, int_type, intValue_method, long_type, longValue_method, number_type, pointer_type, reflectClass, short_type, string_type, toString_method, typeArray0, void_type |
| Methods inherited from class gnu.bytecode.Type |
coerceToObject, emitIsInstance, getName, getSignature, isInstance, isValidJavaTypeName, make, promote, setSignature, signatureLength, signatureLength, signatureToName, signatureToPrimitive, signatureToType, signatureToType |
unknownTypeArray
private static SpecialArray unknownTypeArray
primitive
private boolean primitive
- true if the elements have a primitive type.
unknown
private boolean unknown
- If true, this type denote array of elements with any type
(could be primitive or not).
So the signature for this is Object.
arraycopy
public static final gnu.bytecode.Method arraycopy
wrappedType
private static gnu.bytecode.ClassType wrappedType
- Fields
field
private gnu.bytecode.Field field
objectType
private static gnu.bytecode.ClassType objectType
objectArray
private static gnu.bytecode.ArrayType objectArray
convertMethod
private gnu.bytecode.Method convertMethod
genericConvertMethod
private gnu.bytecode.Method genericConvertMethod
makeMethod
private static gnu.bytecode.Method makeMethod
prefix
private java.lang.String prefix
SpecialArray
protected SpecialArray(gnu.bytecode.Type elements)
SpecialArray
private SpecialArray(gnu.bytecode.Type elements,
java.lang.String prefix,
boolean unknown,
boolean register)
create
public static gnu.bytecode.Type create(gnu.bytecode.Type elements)
- Return a SpecialArray holding elements of type elements.
unknownTypeArray
public static SpecialArray unknownTypeArray()
getInternalName
public java.lang.String getInternalName()
callConvert
private void callConvert(gnu.bytecode.CodeAttr code)
- Conversions
callGenericConvert
private void callGenericConvert(gnu.bytecode.CodeAttr code)
emitCoerceFrom
public void emitCoerceFrom(gnu.bytecode.Type fromType,
gnu.bytecode.CodeAttr code)
isCollectionArray
private boolean isCollectionArray(gnu.bytecode.Type t)
emitCoerceFromObject
public void emitCoerceFromObject(gnu.bytecode.CodeAttr code)
- Description copied from class:
gnu.bytecode.ObjectType
- Compile (in given method) cast from Object to this Type.
emitCoerceFromCollection
private void emitCoerceFromCollection(gnu.bytecode.CodeAttr code)
emitCoerceFromArray
private void emitCoerceFromArray(gnu.bytecode.CodeAttr code)
convertReferenceArray
private static void convertReferenceArray(gnu.bytecode.CodeAttr code,
gnu.bytecode.ArrayType toType,
gnu.bytecode.Type elements)
emitCoerceTo
public void emitCoerceTo(gnu.bytecode.Type toType,
gnu.bytecode.CodeAttr code)
emitCoerceToObject
public void emitCoerceToObject(gnu.bytecode.CodeAttr code)
- Description copied from class:
gnu.bytecode.Type
- Compile code to convert an object (on the stack) to this Type.
coerce
private static void coerce(gnu.bytecode.CodeAttr code,
gnu.bytecode.ArrayType from,
gnu.bytecode.ArrayType to)
getImplementationType
public gnu.bytecode.Type getImplementationType()
- Typing
isSubtype
public boolean isSubtype(gnu.bytecode.Type other)
isAssignableTo
public boolean isAssignableTo(gnu.bytecode.Type other)
wrappedType
public static gnu.bytecode.ClassType wrappedType()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).