jellyj.util
Class ClassType
jellyj.util.Type
|
+--jellyj.util.ReferenceType
|
+--jellyj.util.ClassType
- public class ClassType
- extends ReferenceType
Fields inherited from class jellyj.util.Type |
Boolean, Byte, cache_d, CACHE_SIZE, Char, Double, Error, Exception, Float, Int, Long, Null, RuntimeException, Short, Throwable, Void |
Methods inherited from class jellyj.util.ReferenceType |
ALOAD, ASTORE, DUP, DUPX1, DUPX2, floatingPointType, integralType, LOAD, NEWARRAY, numericType, POP, primitiveType, referenceType, RETURN, STORE |
Methods inherited from class jellyj.util.Type |
ADD, ADDSTRING, AND, CAST, CMP, createClassType, createClassType, createType, createType, DIV, IFGE, IFGT, IFLE, IFLT, MUL, NEG, oneWord, OR, parseType, PUSH, relatedTo, REM, SHL, SHR, SUB, toInternalString, twoWords, USHR, XOR |
interfaces_d
Vector interfaces_d
name_d
Symbol name_d
node_d
TypeDeclarationNode node_d
root_d
static Symbol root_d
rootType_d
static ClassType rootType_d
superType_d
ClassType superType_d
ClassType
public ClassType(String name)
ClassType
public ClassType(Symbol name)
APPENDSTB
public Instruction APPENDSTB(ConstantPoolGen cpg)
distanceTo
public int distanceTo(Type other)
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
identicalTo
public boolean identicalTo(Type other)
IFEQ
public Instruction IFEQ(boolean tozero)
IFNE
public Instruction IFNE(boolean tozero)
isTopType
public boolean isTopType()
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.
subTypeOf
public boolean subTypeOf(Type other)
superInterfaces
public Vector superInterfaces()
superType
public ClassType superType()
superTypeOf
public boolean superTypeOf(Type other)
throwable
public boolean throwable()
toClassFileType
public ClassGenType toClassFileType()
- Map an JellyJ type to a ClassGen one.
toString
public String toString()
VALUEOF
public InstructionList VALUEOF(ConstantPoolGen cpg)
to Class jellyj.util.Symbol
to Class jellyj.syntaxtree.TypeDeclarationNode
to Class java.util.Vector
to Class jellyj.util.ClassType
to Class jellyj.util.Symbol
to Class jellyj.util.ClassType