Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.type
Class ArrayType

java.lang.Object
  extended bynet.sf.jode.type.Type
      extended bynet.sf.jode.type.ReferenceType
          extended bynet.sf.jode.type.ClassType
              extended bynet.sf.jode.type.ArrayType

public class ArrayType
extends ClassType

This type represents an array type.

Author:
Jochen Hoenicke

Field Summary
 
Fields inherited from class net.sf.jode.type.ClassType
className
 
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
 
Method Summary
 Type createRangeType(ReferenceType bottom)
          Create the type corresponding to the range from bottomType to this.
 boolean equals(java.lang.Object o)
           
 Type getCanonic()
          Returns the canonic type of this type set.
 java.lang.String getDefaultName()
          Generates the default name, that is the `natural' choice for local of this type.
 Type getElementType()
           
 Type getGeneralizedType(Type type)
          Returns the common super type of this and type.
 Type getHint()
          Returns the hint type of this type set.
 ClassType[] getInterfaces()
          Returns the reference type representing the interfaces this class implements.
 Type getSpecializedType(Type type)
          Returns the common sub type of this and type.
 Type getSubType()
          The sub types of this type.
 ClassType getSuperClass()
          Returns the reference type representing the super class, or null if this reference type represents java.lang.Object, or for interfaces.
 Type getSuperType()
          The super types of this type.
 java.lang.Class getTypeClass()
          Returns the java.lang.Class representing this type.
 java.lang.String getTypeSignature()
          Returns the type signature of this type.
 boolean isFinal()
          Checks if this type represents an interface.
 boolean isInterface()
          Checks if this type represents an interface.
 boolean isSubTypeOf(Type type)
          Returns true, if this is a sub type of type.
 boolean isUnknown()
          Checks if this type represents an interface.
 boolean isValidType()
          Checks if this type represents a valid type instead of a list of minimum types.
 
Methods inherited from class net.sf.jode.type.ClassType
getCastHelper, getClassName, hashCode, isClassType, maybeSubTypeOf, toString
 
Methods inherited from class net.sf.jode.type.ReferenceType
findCommonClassTypes, implementsAllIfaces, intersection
 
Methods inherited from class net.sf.jode.type.Type
getDefaultValue, getTypeCode, isOfType, 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
 

Method Detail

isInterface

public boolean isInterface()
Description copied from class: ClassType
Checks if this type represents an interface.

Specified by:
isInterface in class ClassType
Returns:
true if this is an interface, false if this is a class or if unsure.

isUnknown

public boolean isUnknown()
Description copied from class: ClassType
Checks if this type represents an interface.

Specified by:
isUnknown in class ClassType
Returns:
true if this is an interface, false if this is a class or if unsure.

isFinal

public boolean isFinal()
Description copied from class: ClassType
Checks if this type represents an interface.

Specified by:
isFinal in class ClassType
Returns:
true if this is an interface, false if this is a class or if unsure.

getSuperClass

public ClassType getSuperClass()
Description copied from class: ClassType
Returns the reference type representing the super class, or null if this reference type represents java.lang.Object, or for interfaces.

Specified by:
getSuperClass in class ClassType
Returns:
the super class' type.

getInterfaces

public ClassType[] getInterfaces()
Description copied from class: ClassType
Returns the reference type representing the interfaces this class implements. This may of course be an empty array.

Specified by:
getInterfaces in class ClassType
Returns:
the interfaces' types.

getElementType

public Type getElementType()

getSuperType

public Type getSuperType()
Description copied from class: Type
The super types of this type.

Overrides:
getSuperType in class ReferenceType

getSubType

public Type getSubType()
Description copied from class: Type
The sub types of this type.

Overrides:
getSubType in class ClassType

getHint

public Type getHint()
Description copied from class: Type
Returns the hint type of this type set. This returns the singleton set containing only the `most likely' type in this set. This doesn't work for tError or tUnknown, and may lead to errors for certain range types.

Overrides:
getHint in class ClassType

getCanonic

public Type getCanonic()
Description copied from class: Type
Returns the canonic type of this type set. The intention is, to return for each expression the type, that the java compiler would assign to this expression.

Overrides:
getCanonic in class ClassType

isSubTypeOf

public boolean isSubTypeOf(Type type)
Description copied from class: Type
Returns true, if this is a sub type of type.

Overrides:
isSubTypeOf in class ClassType

createRangeType

public Type createRangeType(ReferenceType bottom)
Create the type corresponding to the range from bottomType to this.

Overrides:
createRangeType in class ClassType
Returns:
the range type, or tError if not possible.

getSpecializedType

public Type getSpecializedType(Type type)
Returns the common sub type of this and type.

Overrides:
getSpecializedType in class ClassType
Parameters:
type - the other type.
Returns:
the common sub type.

getGeneralizedType

public Type getGeneralizedType(Type type)
Returns the common super type of this and type.

Overrides:
getGeneralizedType in class ClassType
Parameters:
type - the other type.
Returns:
the common super type.

isValidType

public boolean isValidType()
Checks if this type represents a valid type instead of a list of minimum types.

Overrides:
isValidType in class ClassType

getTypeSignature

public java.lang.String getTypeSignature()
Description copied from class: Type
Returns the type signature of this type. You should only call this on singleton types.

Overrides:
getTypeSignature in class ClassType

getTypeClass

public java.lang.Class getTypeClass()
                             throws java.lang.ClassNotFoundException
Description copied from class: Type
Returns the java.lang.Class representing this type. You should only call this on singleton types.

Overrides:
getTypeClass in class ClassType
Throws:
java.lang.ClassNotFoundException

getDefaultName

public java.lang.String getDefaultName()
Description copied from class: ClassType
Generates the default name, that is the `natural' choice for local of this type.

Overrides:
getDefaultName in class ClassType
Returns:
the default name of a local of this type.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class ClassType

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.