|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--koala.dynamicjava.interpreter.TreeClassFinder
The instances of the classes that implements this interface are used to find the fully qualified name of classes and to manage the loading of these classes.
Field Summary | |
protected ClassPool |
classPool
The class pool |
protected Context |
context
The context |
protected Interpreter |
interpreter
The current interpreter |
Constructor Summary | |
TreeClassFinder(Context ctx,
Interpreter i,
ClassPool cp)
Creates a new class finder |
Method Summary | |
ClassInfo |
addClassInfo(java.lang.String cname,
TypeDeclaration decl)
Adds a type declaration in the class info list |
java.lang.String |
getCurrentPackage()
Returns the current package |
ImportationManager |
getImportationManager()
Returns the importation manager |
Interpreter |
getInterpreter()
Returns the current interpreter |
ClassInfo |
lookupClass(java.lang.String cname)
Loads the class info that match the given name in the source file |
ClassInfo |
lookupClass(java.lang.String cname,
ClassInfo cinfo)
Loads the class info that match the given name in the source file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Context context
protected Interpreter interpreter
protected ClassPool classPool
Constructor Detail |
public TreeClassFinder(Context ctx, Interpreter i, ClassPool cp)
ctx
- the contexti
- the current interpretercp
- the class poolMethod Detail |
public Interpreter getInterpreter()
public java.lang.String getCurrentPackage()
getCurrentPackage
in interface ClassFinder
public ImportationManager getImportationManager()
public ClassInfo lookupClass(java.lang.String cname) throws java.lang.ClassNotFoundException
lookupClass
in interface ClassFinder
cname
- the name of the class to findjava.lang.ClassNotFoundException
- if the class cannot be loadedpublic ClassInfo lookupClass(java.lang.String cname, ClassInfo cinfo) throws java.lang.ClassNotFoundException
lookupClass
in interface ClassFinder
cname
- the name of the class to findcinfo
- the context where 'cname' was foundjava.lang.ClassNotFoundException
- if the class cannot be loadedpublic ClassInfo addClassInfo(java.lang.String cname, TypeDeclaration decl)
addClassInfo
in interface ClassFinder
cname
- the name of the classdecl
- the type declaration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |