|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.ClassLoader
|
+--net.janino.JavaSourceClassLoader
A java.lang.ClassLoader that, unlike usual java.lang.ClassLoaders,
does not load byte code, but reads JavaTM source code and then scans, parses,
compiles and loads it into the virtual machine.
| Constructor Summary | |
JavaSourceClassLoader(java.lang.ClassLoader parentClassLoader,
java.io.File[] optionalSourcePath,
java.lang.String optionalCharacterEncoding,
int debuggingInformation)
Set up a JavaSourceClassLoader that finds JavaTM source code in a file
that resides in either of the directories specified by the given source path. |
|
| Method Summary | |
protected java.lang.Class |
findClass(java.lang.String name)
Implementation of java.lang.ClassLoader.findClass(String). |
static void |
main(java.lang.String[] args)
Read JavaTM source code for a given class name, scan, parse, compile and load it into the virtual machine, and invoke its "main()" method. |
| Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JavaSourceClassLoader(java.lang.ClassLoader parentClassLoader,
java.io.File[] optionalSourcePath,
java.lang.String optionalCharacterEncoding,
int debuggingInformation)
JavaSourceClassLoader that finds JavaTM source code in a file
that resides in either of the directories specified by the given source path.parent - optionalSourcePath - A collection of directories that are searched for JavaTM source files in the given orderoptionalCharacterEncoding - The encoding of the JavaTM source files (null for platform default encoding)| Method Detail |
public static void main(java.lang.String[] args)
Usage is as follows:
java [ java-option ] net.janino.JavaSourceClassLoader [ option ] ... class-name [ arg ] ...
java-option Any valid option for the Java Virtual Machine (e.g. "-classpath colon-separated-list-of-class-directories")
option:
-sourcepath colon-separated-list-of-source-directories
-encoding character-encoding
protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
java.lang.ClassLoader.findClass(String).findClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundException - TunnelException - wraps a Scanner.ScanExceptionTunnelException - wraps a Parser.ParseExceptionTunnelException - wraps a IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||