|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jode.type.Type
net.sf.jode.type.ReferenceType
This is an abstrace super class of all reference types. Reference types are NullType, MultiClassType, and ClassType with its sub types ClassInfoType, SystemClassType, and ArrayType.
To do intersection on range types, the reference types need three more operations: specialization, generalization and createRange.
specialization chooses all common sub type of two types. It is used to find the bottom of the intersected interval.
generalization chooses the common super type of two types. It is used to find the top of the intersected interval.
When the new interval is created with createRangeType
the bottom and top are adjusted so that they only consists of
possible types. It then decides, if it needs a range type, or if
the reference types already represents all types.
Field Summary |
Fields inherited from class net.sf.jode.type.Type |
EMPTY_IFACES, tBoolByte, tBoolean, tBoolInt, tBoolUInt, tByte, TC_ARRAY, TC_BOOLEAN, TC_BYTE, TC_CHAR, TC_CLASS, TC_CLASSIFACE, TC_DOUBLE, TC_ERROR, TC_FLOAT, TC_INT, TC_INTEGER, TC_LONG, TC_METHOD, TC_NULL, TC_RANGE, TC_SHORT, TC_SYSCLASS, TC_UNKNOWN, TC_VOID, tChar, tCloneable, tComparable, tDouble, tError, tFloat, tInt, tJavaLangClass, tLong, tNull, tObject, tSerializable, tShort, tString, tStringBuffer, tStringBuilder, tUInt, tUnknown, tUObject, tVoid |
Constructor Summary | |
ReferenceType(int typecode)
|
Method Summary | |
abstract Type |
createRangeType(ReferenceType bottom)
Creates a range type set of this and bottom. |
Type |
findCommonClassTypes(java.util.Stack otherTypes)
|
abstract Type |
getGeneralizedType(Type type)
Returns the generalized type set of this and type. |
abstract Type |
getSpecializedType(Type type)
Returns the specialized type set of this and type. |
abstract Type |
getSubType()
The sub types of this type. |
Type |
getSuperType()
The super types of this type. |
protected static boolean |
implementsAllIfaces(ClassInfo clazz,
ClassInfo[] ifaces,
ClassInfo[] otherIfaces)
Tells if all otherIfaces, are implemented by at least one ifaces or by clazz. |
Type |
intersection(Type type)
Intersect this type with another type and return the new type. |
Methods inherited from class net.sf.jode.type.Type |
getCanonic, getCastHelper, getDefaultName, getDefaultValue, getHint, getTypeClass, getTypeCode, getTypeSignature, isClassType, isOfType, isSubTypeOf, isValidType, maybeSubTypeOf, stackSize, tArray, tClass, tClass, tMethod, toString, tRange, tSubType, tSuperType, tSystemClass, tType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ReferenceType(int typecode)
Method Detail |
public abstract Type getSpecializedType(Type type)
type
- the other type.
public abstract Type getGeneralizedType(Type type)
type
, iff it is
extended/implemented by one type in the resulting type set.
type
- the other type.
public Type findCommonClassTypes(java.util.Stack otherTypes)
public abstract Type createRangeType(ReferenceType bottom)
bottom
- the bottom type.
protected static boolean implementsAllIfaces(ClassInfo clazz, ClassInfo[] ifaces, ClassInfo[] otherIfaces)
clazz
- The clazz, can be null.ifaces
- The ifaces.
public Type getSuperType()
Type
getSuperType
in class Type
public abstract Type getSubType()
Type
getSubType
in class Type
public Type intersection(Type type)
intersection
in class Type
type
- the other type.
|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |