jellyj.util
Class ClassType

jellyj.util.Type
  |
  +--jellyj.util.ReferenceType
        |
        +--jellyj.util.ClassType

public class ClassType
extends ReferenceType


Field Summary
 (package private) Vectorinterfaces_d
           
 (package private) Symbolname_d
           
 (package private) TypeDeclarationNodenode_d
           
 (package private) static Symbolroot_d
           
 (package private) static ClassTyperootType_d
           
 (package private) ClassTypesuperType_d
           

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

Constructor Summary
ClassType(String name)
           
ClassType(Symbol name)
           

Method Summary
 InstructionAPPENDSTB(ConstantPoolGen cpg)
           
 intdistanceTo(Type other)
           
 SymbolfindField(Symbol fname)
          Search for a field in this type or in any of its super types (both classes and interfaces).
 MethodDescfindMethod(MethodDesc mdesc)
          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
 booleanidenticalTo(Type other)
           
 InstructionIFEQ(boolean tozero)
           
 InstructionIFNE(boolean tozero)
           
 booleanisTopType()
           
 Symbolname()
           
 (package private) voidreadClassFile()
          Make sure that this type is accessible using the symbol table.
 booleansubTypeOf(Type other)
           
 VectorsuperInterfaces()
           
 ClassTypesuperType()
           
 booleansuperTypeOf(Type other)
           
 booleanthrowable()
           
 ClassGenTypetoClassFileType()
          Map an JellyJ type to a ClassGen one.
 StringtoString()
           
 InstructionListVALUEOF(ConstantPoolGen cpg)
           

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

Field Detail

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
Constructor Detail

ClassType

public ClassType(String name)

ClassType

public ClassType(Symbol name)
Method Detail

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)

Association Links

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