All Packages Class Hierarchy This Package Previous Next Index
Class espresso.util.ClassType
java.lang.Object
|
+----espresso.util.Type
|
+----espresso.util.ReferenceType
|
+----espresso.util.ClassType
- public class ClassType
- extends ReferenceType
-
interfaces_d
-
-
name_d
-
-
node_d
-
-
root_d
-
-
rootType_d
-
-
superType_d
-
-
ClassType(String)
-
-
ClassType(Symbol)
-
-
distanceTo(Type)
-
-
findField(Symbol)
-
Search for a field in this type or in any of its super types
(both classes and interfaces).
-
findMethod(MethodDesc)
-
Search for a method in this type or in any of its super types
Returns the closest unique occurrence of a method type, that is
most specific, or null if no match was established
If the most specific method type is not unique, than we have 2 cases :
- if the 2 methods are defined in the same class, than an ambiguous
type error is thrown
- if the 2 mthods are defined in different classes, than we have 2 sub cases
- if the 2 method types are identical, than the one closer to the
leaf of the type hierarchy overrides the one higher up
- if the 2 method types are not identical, then a ambiguous type error is thrown
If a more specific method type is encountered higher up in the type hierarchy,
then this also results in an ambiguous type error
-
identicalTo(Type)
-
-
IFEQ(boolean)
-
-
IFNE(boolean)
-
-
isTopType()
-
-
name()
-
-
readClassFile()
- Make sure that this type is accessible using the symbol table.
-
subTypeOf(Type)
-
-
superInterfaces()
-
-
superType()
-
-
superTypeOf(Type)
-
-
toClassFileType()
- Map an Espresso type to a ClassGen one.
-
toString()
-
name_d
Symbol name_d
node_d
TypeDeclarationNode node_d
interfaces_d
Vector interfaces_d
superType_d
ClassType superType_d
root_d
static Symbol root_d
rootType_d
static ClassType rootType_d
ClassType
public ClassType(String name)
ClassType
public ClassType(Symbol name)
name
public Symbol name()
readClassFile
void readClassFile()
- Make sure that this type is accessible using the symbol table.
Note that the import manager caches read requests.
identicalTo
public boolean identicalTo(Type other)
- Overrides:
- identicalTo in class ReferenceType
isTopType
public boolean isTopType()
superType
public ClassType superType()
superInterfaces
public Vector superInterfaces()
subTypeOf
public boolean subTypeOf(Type other)
- Overrides:
- subTypeOf in class ReferenceType
superTypeOf
public boolean superTypeOf(Type other)
- Overrides:
- superTypeOf in class ReferenceType
distanceTo
public int distanceTo(Type other)
- Overrides:
- distanceTo in class ReferenceType
findField
public Symbol findField(Symbol fname) throws AmbiguousName
- Search for a field in this type or in any of its super types
(both classes and interfaces). Returns a fully qualified name.
findMethod
public MethodDesc findMethod(MethodDesc mdesc) throws TypeCheckError
- Search for a method in this type or in any of its super types
Returns the closest unique occurrence of a method type, that is
most specific, or null if no match was established
If the most specific method type is not unique, than we have 2 cases :
- if the 2 methods are defined in the same class, than an ambiguous
type error is thrown
- if the 2 mthods are defined in different classes, than we have 2 sub cases
- if the 2 method types are identical, than the one closer to the
leaf of the type hierarchy overrides the one higher up
- if the 2 method types are not identical, then a ambiguous type error is thrown
If a more specific method type is encountered higher up in the type hierarchy,
then this also results in an ambiguous type error
toString
public String toString()
- Overrides:
- toString in class Type
toClassFileType
public ClassGenType toClassFileType()
- Map an Espresso type to a ClassGen one.
- Overrides:
- toClassFileType in class Type
IFEQ
public Instruction IFEQ(boolean tozero)
- Overrides:
- IFEQ in class Type
IFNE
public Instruction IFNE(boolean tozero)
- Overrides:
- IFNE in class Type
All Packages Class Hierarchy This Package Previous Next Index