org.codehaus.janino

Class JavaSourceIClassLoader

public final class JavaSourceIClassLoader extends IClassLoader

This IClassLoader finds, scans and parses compilation units.

Notice that it does not compile them!

Constructor Summary
JavaSourceIClassLoader(ResourceFinder sourceFinder, String optionalCharacterEncoding, Set unitCompilers, IClassLoader optionalParentIClassLoader)
Notice that the unitCompilers set is both read and written by the JavaSourceIClassLoader: As it searches for IClasses, it looks into unitCompilers for class declarations, and as it opens, scans and parses compilation units on-the-fly, it adds them to unitCompilers.
Method Summary
IClassfindIClass(String type)
voidsetCompileErrorHandler(UnitCompiler.ErrorHandler optionalCompileErrorHandler)
voidsetWarningHandler(WarningHandler optionalWarningHandler)

Constructor Detail

JavaSourceIClassLoader

public JavaSourceIClassLoader(ResourceFinder sourceFinder, String optionalCharacterEncoding, Set unitCompilers, IClassLoader optionalParentIClassLoader)
Notice that the unitCompilers set is both read and written by the JavaSourceIClassLoader: As it searches for IClasses, it looks into unitCompilers for class declarations, and as it opens, scans and parses compilation units on-the-fly, it adds them to unitCompilers.

Method Detail

findIClass

public IClass findIClass(String type)

Parameters: type field descriptor of the IClass to load, e.g. "Lpkg1/pkg2/Outer$Inner;"

Throws: ClassNotFoundException if an exception was raised while loading the IClass

setCompileErrorHandler

public void setCompileErrorHandler(UnitCompiler.ErrorHandler optionalCompileErrorHandler)

See Also: UnitCompiler

setWarningHandler

public void setWarningHandler(WarningHandler optionalWarningHandler)

See Also: setWarningHandler UnitCompiler