|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.util.Utils | +--at.dms.kjc.CType | +--at.dms.kjc.CClassType | +--at.dms.kjc.CArrayType
This class represents the type of an array in the type structure.
Fields inherited from class at.dms.kjc.CClassType |
EMPTY |
Fields inherited from class at.dms.kjc.CType |
signatureParser, type |
Fields inherited from class at.dms.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
Fields inherited from interface at.dms.kjc.Constants |
CMP_VERSION, JAV_CLASS, JAV_CLONE, JAV_CLONEABLE, JAV_CONSTRUCTOR, JAV_ERROR, JAV_EXCEPTION, JAV_INIT, JAV_LENGTH, JAV_NAME_SEPARATOR, JAV_OBJECT, JAV_OUTER_THIS, JAV_RUNTIME, JAV_RUNTIME_EXCEPTION, JAV_STATIC_INIT, JAV_STRING, JAV_STRINGBUFFER, JAV_THIS, JAV_THROWABLE, OPE_BAND, OPE_BNOT, OPE_BOR, OPE_BSR, OPE_BXOR, OPE_EQ, OPE_GE, OPE_GT, OPE_LE, OPE_LNOT, OPE_LT, OPE_MINUS, OPE_NE, OPE_PERCENT, OPE_PLUS, OPE_POSTDEC, OPE_POSTINC, OPE_PREDEC, OPE_PREINC, OPE_SIMPLE, OPE_SL, OPE_SLASH, OPE_SR, OPE_STAR, TID_ARRAY, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_LONG, TID_SHORT, TID_VOID |
Constructor Summary | |
CArrayType(CType baseType,
int arrayBound)
Constructs an array type. |
Method Summary | |
void |
appendSignature(FastStringBuffer buffer)
Appends the classfile signature of this type to the buffer
parameter. |
boolean |
checked()
Returns true if this type is checked and valid. |
void |
checkType(CContext context)
Check that type is valid. |
boolean |
equals(CType other)
Returns true if this type is equal to another CType. |
int |
getArrayBound()
Returns the number of dimensions of this array type. |
CType |
getBaseType()
Returns the base class of this type. |
CClass |
getCClass()
Returns the class object associated with this type If this type was never checked (read from class files) check it! |
CType |
getIndexedType()
Returns the type that has one dimension less than this array type. |
java.lang.String |
getQualifiedName()
Returns the signature. |
int |
getSize()
Returns the size used in stack by value of this type. |
boolean |
implicitlyCastTo(CType dest)
implicitlyCastTo |
boolean |
isArrayType()
Returns true, because this is the class for array types. |
boolean |
isAssignableTo(CType dest)
isAssignableTo |
boolean |
isCastableTo(CType dest)
Can this type be converted to the specified type by casting conversion (JLS 5.5) ? |
boolean |
isReference()
Returns true because an array always has a reference type. |
java.lang.String |
toString()
Transforms this type to a string |
Methods inherited from class at.dms.kjc.CClassType |
getIdent, isChecked, isCheckedException, isClassType, lookup, lookup, setClass, setClassFromName |
Methods inherited from class at.dms.kjc.CType |
genMethodSignature, getLoadOpcode, getReturnOpcode, getSignature, getStoreOpcode, getTypeID, isCodedHasInt, isFloatingPoint, isNumeric, isOrdinal, isPrimitive, parseMethodSignature, parseSignature |
Methods inherited from class at.dms.util.Utils |
assert, assert, fail, fail, hasFlag, hasMoreThanOneFlag, hasOtherFlags, splitQualifiedName, splitQualifiedName, vectorToArray, vectorToIntArray |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public CArrayType(CType baseType, int arrayBound)
baseType
- The base type of the array.arrayBound
- The number of dimensions of the array.Method Detail |
public java.lang.String toString()
toString
in class CClassType
public java.lang.String getQualifiedName()
getQualifiedName
in class CClassType
public void appendSignature(FastStringBuffer buffer)
buffer
parameter.appendSignature
in class CClassType
public int getSize()
getSize
in class CClassType
public boolean isReference()
isReference
in class CClassType
public boolean isArrayType()
isArrayType
in class CType
public CType getBaseType()
public CType getIndexedType()
public int getArrayBound()
public boolean checked()
checked
in class CType
public boolean equals(CType other)
equals
in class CClassType
public void checkType(CContext context) throws UnpositionedError
checkType
in class CClassType
UnpositionedError
- This error will be positioned soon.public CClass getCClass()
getCClass
in class CClassType
public boolean isAssignableTo(CType dest)
isAssignableTo
in class CClassType
dest
- The destination type.public boolean isCastableTo(CType dest)
isCastableTo
in class CClassType
dest
- the destination typepublic boolean implicitlyCastTo(CType dest)
implicitlyCastTo
in class CClassType
dest
- the expression type to cast to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |