|
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.RangeType
This class represents a set of reference types. The set contains
all types that are castable to all the bottom types by a widening
cast and to which one of the top types can be casted to by a
widening cast.
For a totally unknown reference type bottomType is tObject and
topType is tNull. The bottomType is always guaranteed to be not
tNull. And all topTypes must be castable to all bottom types with
a widening cast.
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.
ReferenceType
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 | |
RangeType(ReferenceType bottomType,
ReferenceType topType)
Create a new range type with the given bottom and top set. |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
ReferenceType |
getBottom()
Returns the bottom type set. |
Type |
getCanonic()
Returns the canonic type of this range type set. |
Type |
getCastHelper(Type fromType)
Checks if we need to cast to a middle type, before we can cast from fromType to this type. |
java.lang.String |
getDefaultName()
Generates the default name, that is the `natural' choice for local of this type. |
Type |
getHint()
Returns the hint type of this range type set. |
Type |
getSubType()
The set of sub types of this type. |
Type |
getSuperType()
The set of super types of this type. |
ReferenceType |
getTop()
Returns the top type set. |
java.lang.Class |
getTypeClass()
Returns the java.lang.Class representing this type. |
java.lang.String |
getTypeSignature()
Returns the type signature of this type. |
int |
hashCode()
|
Type |
intersection(Type type)
Intersect this type with another type and return the new type. |
java.lang.String |
toString()
Returns a string representation describing this type set. |
Methods inherited from class net.sf.jode.type.Type |
getDefaultValue, getTypeCode, isClassType, isOfType, isSubTypeOf, isValidType, maybeSubTypeOf, stackSize, tArray, tClass, tClass, tMethod, tRange, tSubType, tSuperType, tSystemClass, tType |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RangeType(ReferenceType bottomType, ReferenceType topType)
Method Detail |
public ReferenceType getBottom()
public ReferenceType getTop()
public Type getHint()
getHint
in class Type
public Type getCanonic()
getCanonic
in class Type
public Type getSuperType()
getSuperType
in class Type
public Type getSubType()
getSubType
in class Type
public Type getCastHelper(Type fromType)
getCastHelper
in class Type
public java.lang.String getTypeSignature()
Type
getTypeSignature
in class Type
public java.lang.Class getTypeClass() throws java.lang.ClassNotFoundException
Type
getTypeClass
in class Type
java.lang.ClassNotFoundException
public java.lang.String toString()
Type
toString
in class Type
public java.lang.String getDefaultName()
Type
getDefaultName
in class Type
public int hashCode()
public boolean equals(java.lang.Object o)
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 |