|
||||||||||
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
This class represents class types in the type structure.
Field Summary | |
static CClassType[] |
EMPTY
Constant for an empty aray of CClassType. |
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 | |
protected |
CClassType()
Construct a class type that is yet unresolved; this constructor is protected and for use by subclasses. |
|
CClassType(CClass clazz)
Construct a class type. |
Method Summary | |
protected void |
appendSignature(FastStringBuffer buffer)
Transforms this type to a string. |
void |
checkType(CContext context)
Check that type is valid. |
boolean |
equals(CType other)
equals. |
CClass |
getCClass()
Returns the class object associated with this type If this type was never checked (read from class files) check it! |
java.lang.String |
getIdent()
|
java.lang.String |
getQualifiedName()
Returns the qualified name of the class of this class type. |
int |
getSize()
Returns the size used in stack by value of this type. |
boolean |
implicitlyCastTo(CType destination)
implicitlyCastTo. |
boolean |
isAssignableTo(CType destination)
isAssignableTo |
boolean |
isCastableTo(CType destination)
Can this type be converted to the specified type by casting conversion (JLS 5.5) ? |
protected boolean |
isChecked()
Returns whether the type is checked. |
boolean |
isCheckedException()
Whether this is an exception that should be declared. |
boolean |
isClassType()
Check if a type is a class type. |
boolean |
isReference()
Check if a type is a reference. |
static CClassType |
lookup(java.lang.String className)
Looks up CClassType object for the qualifiedName using a static Map. |
static CClassType |
lookup(java.lang.String className,
InnerClassInfo extraInfo)
Looks up CClassType object for the qualifiedName using a static Map. |
protected void |
setClass(CClass clazz)
Sets the CClass export belonging to this CClassType. |
protected void |
setClassFromName(java.lang.String name,
InnerClassInfo extraInfo)
Tries to set the CClass export belonging to this CClassType by loading it from the top level. |
java.lang.String |
toString()
Transforms this type to a string. |
Methods inherited from class at.dms.kjc.CType |
checked, genMethodSignature, getLoadOpcode, getReturnOpcode, getSignature, getStoreOpcode, getTypeID, isArrayType, 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 |
|
Field Detail |
public static final CClassType[] EMPTY
Constructor Detail |
protected CClassType()
public CClassType(CClass clazz)
clazz
- The class that will be represented by this type.Method Detail |
public static CClassType lookup(java.lang.String className)
public static CClassType lookup(java.lang.String className, InnerClassInfo extraInfo)
protected boolean isChecked()
protected void setClass(CClass clazz)
protected void setClassFromName(java.lang.String name, InnerClassInfo extraInfo)
public boolean equals(CType other)
equals
in class CType
public java.lang.String toString()
toString
in class CType
protected void appendSignature(FastStringBuffer buffer)
appendSignature
in class CType
public java.lang.String getIdent()
public java.lang.String getQualifiedName()
public int getSize()
getSize
in class CType
public boolean isReference()
isReference
in class CType
public boolean isClassType()
isClassType
in class CType
public CClass getCClass()
getCClass
in class CType
public void checkType(CContext context) throws UnpositionedError
checkType
in class CType
context
- The context (may be be null)UnpositionedError
- This error will be positioned soon.public boolean isAssignableTo(CType destination)
isAssignableTo
in class CType
destination
- The destination type.public boolean isCastableTo(CType destination)
isCastableTo
in class CType
destination
- The destination type.public boolean implicitlyCastTo(CType destination)
implicitlyCastTo
in class CType
destination
- The expression type to cast to.public boolean isCheckedException()
isCheckedException
in class CType
at.dms.kjc.CType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |