koala.dynamicjava.util
Class BufferedImportationManager
java.lang.Object
|
+--koala.dynamicjava.util.ImportationManager
|
+--koala.dynamicjava.util.BufferedImportationManager
- All Implemented Interfaces:
- java.lang.Cloneable
- public class BufferedImportationManager
- extends ImportationManager
A buffered version of the importation manager
Field Summary |
protected java.util.Map |
buffer
The class buffer |
Method Summary |
java.lang.Object |
clone()
Returns a copy of this object |
void |
declareClassImport(java.lang.String cname)
Declares a new single-type-import clause |
void |
declarePackageImport(java.lang.String pkg)
Declares a new import-on-demand clause |
java.lang.Class |
lookupClass(java.lang.String cname,
java.lang.String ccname)
Loads the class that match to the given name in the source file |
void |
setCurrentPackage(java.lang.String pkg)
Sets the current package. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected java.util.Map buffer
- The class buffer
BufferedImportationManager
public BufferedImportationManager(java.lang.ClassLoader cl)
- Creates a new importation manager.
- Parameters:
cl
- the class loader to use
BufferedImportationManager
protected BufferedImportationManager(ImportationManager im)
- Copy constructor
clone
public java.lang.Object clone()
- Returns a copy of this object
- Overrides:
clone
in class ImportationManager
setCurrentPackage
public void setCurrentPackage(java.lang.String pkg)
- Sets the current package. This has no influence on the
behaviour of the
lookupClass
method.
- Overrides:
setCurrentPackage
in class ImportationManager
- Parameters:
pkg
- the package name
declarePackageImport
public void declarePackageImport(java.lang.String pkg)
- Declares a new import-on-demand clause
- Overrides:
declarePackageImport
in class ImportationManager
- Parameters:
pkg
- the package name
declareClassImport
public void declareClassImport(java.lang.String cname)
throws java.lang.ClassNotFoundException
- Declares a new single-type-import clause
- Overrides:
declareClassImport
in class ImportationManager
- Parameters:
cname
- the fully qualified class name- Throws:
java.lang.ClassNotFoundException
- if the class cannot be found
lookupClass
public java.lang.Class lookupClass(java.lang.String cname,
java.lang.String ccname)
throws java.lang.ClassNotFoundException
- Loads the class that match to the given name in the source file
- Overrides:
lookupClass
in class ImportationManager
- Parameters:
cname
- the name of the class to findccname
- the name of the current class or null- Returns:
- the class found
- Throws:
java.lang.ClassNotFoundException
- if the class cannot be loaded
Copyright © 2001 Stephane Hillion. All Rights Reserved.