|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dpt.symbtab.Definition | +--dpt.symbtab.ScopedDef | +--dpt.symbtab.HasImports | +--dpt.symbtab.ClassDef
Definition of a Java class OR interface These are merged together because there are places where we just don't know if something is an interface or class (because we are not looking at the classes/interfaces that are imported.)
Field Summary | |
(package private) static int |
CLASS
|
private int |
classOrInterface
The type of object this represents We may not initially know, as a statement like import java.awt.Color _could_ be referring to a class _or_ interface. |
(package private) static int |
EITHER
|
private JavaVector |
implementers
A list of classes that implement this interface (This only applies if this represents an INTERFACE) |
(package private) static int |
INTERFACE
|
private JavaVector |
interfaces
A list of interfaces that this class implements, OR a list of super interfaces for this interface |
private java.util.Vector |
modifiers
|
private JavaVector |
subClasses
A list of classes that extend this class, OR interfaces that extend this interface |
private ClassDef |
superClass
The class from which this class was extended (This only applies if this represents a CLASS) |
Fields inherited from class dpt.symbtab.HasImports |
imports |
Fields inherited from class dpt.symbtab.ScopedDef |
elements,
iAmDefaultOrBaseScope,
unresolvedStuff |
Fields inherited from class dpt.symbtab.Definition |
definition,
name,
parentScope,
references,
ST_CL,
ST_FU,
ST_FU_EXT,
ST_IF,
ST_IMPL,
ST_IMPORT,
ST_PAC,
ST_SUB,
ST_SUPER,
ST_VAR |
Constructor Summary | |
(package private) |
ClassDef()
Constructor for java.lang.Object This was the easiest way to avoid a nasty endless recursion |
(package private) |
ClassDef(java.lang.String name,
Occurrence occ,
ClassDef superClass,
JavaVector interfaces,
ScopedDef parentScope)
|
(package private) |
ClassDef(java.lang.String name,
Occurrence occ,
ClassDef superClass,
JavaVector interfaces,
ScopedDef parentScope,
java.util.Vector modifiers)
Constructor to set up a class |
Method Summary | |
(package private) void |
addImplementer(ClassDef def)
Adds a reference to the list of classes that implement this interface |
(package private) void |
addSubclass(ClassDef subclass)
Add a reference to a class that extends this class (or an interface that extends this interface |
(package private) JavaVector |
getImplementers()
get the list of classes that implement this interface |
(package private) JavaVector |
getInterfaces()
Return the list of interfaces that this class implements (or the interfaces that this interface extends) |
java.lang.String |
GetItem(int TypID)
|
java.util.Vector |
GetItems(int TypID,
java.lang.String modifier)
|
java.lang.String |
GetLocation(int TypID,
java.lang.String sName)
|
java.lang.String |
GetLocation(int TypID,
java.lang.String sName,
java.lang.String sSymbol)
|
(package private) JavaVector |
getSubClasses()
return a list of all subclasses/subinterfaces of this |
(package private) ClassDef |
getSuperClass()
Return a reference to the superclass of this class |
(package private) boolean |
isClass()
Does this represent a Java class? |
(package private) boolean |
isInterface()
Does this represent a Java interface? |
(package private) Definition |
lookup(java.lang.String name,
int numParams)
Lookup a method in the class or its superclasses |
void |
report(IndentingPrintWriter out)
|
(package private) void |
resolveTypes(SymbolTable symbolTable)
resolve referenced symbols |
(package private) void |
setInterfaces(JavaVector interfaces)
Set the list of interfaces that this class implements |
(package private) void |
setSuperClass(ClassDef superClass)
set the superclass of this class |
(package private) void |
setType(int type)
Specify if this is a class or interface once we know |
Methods inherited from class dpt.symbtab.HasImports |
closeImports,
getImports,
isTopLevel,
openImports,
reportImports,
setImports |
Methods inherited from class dpt.symbtab.ScopedDef |
add,
addUnresolved,
GetListItems,
GetStringItems,
GetStringLocation,
hasElements,
isDefaultOrBaseScope,
reportElements,
setDefaultOrBaseScope |
Methods inherited from class dpt.symbtab.Definition |
addReference,
ExtractClass,
ExtractClass,
ExtractName,
ExtractPackage,
ExtractPackage,
getDef,
getName,
getOccurrence,
getParentScope,
getQualifiedName,
GetReferences,
isSuperClassOf,
listReferences,
lookup,
setParentScope,
toString |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final int CLASS
static final int INTERFACE
static final int EITHER
private int classOrInterface
private ClassDef superClass
private JavaVector subClasses
private JavaVector interfaces
private JavaVector implementers
private java.util.Vector modifiers
Constructor Detail |
ClassDef()
ClassDef(java.lang.String name, Occurrence occ, ClassDef superClass, JavaVector interfaces, ScopedDef parentScope, java.util.Vector modifiers)
ClassDef(java.lang.String name, Occurrence occ, ClassDef superClass, JavaVector interfaces, ScopedDef parentScope)
Method Detail |
void addImplementer(ClassDef def)
void addSubclass(ClassDef subclass)
JavaVector getImplementers()
JavaVector getInterfaces()
JavaVector getSubClasses()
ClassDef getSuperClass()
boolean isClass()
boolean isInterface()
Definition lookup(java.lang.String name, int numParams)
public java.lang.String GetLocation(int TypID, java.lang.String sName, java.lang.String sSymbol)
public java.lang.String GetLocation(int TypID, java.lang.String sName)
public java.lang.String GetItem(int TypID)
public java.util.Vector GetItems(int TypID, java.lang.String modifier)
public void report(IndentingPrintWriter out)
void resolveTypes(SymbolTable symbolTable)
void setInterfaces(JavaVector interfaces)
void setSuperClass(ClassDef superClass)
void setType(int type)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |