ClassLoader that, unlike usual ClassLoaders, does not load byte code, but reads Java source
code and then scans, parses, compiles and loads it into the virtual machine.
As with any ClassLoader, it is not possible to "update" classes after they've been loaded. The way to
achieve this is to give up on the AbstractJavaSourceClassLoader and create a new one.
| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| protected AbstractJavaSourceClassLoader. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public InputStream | getResourceAsStream(String
The resource name name)Overrides java. |
| public static void | |
| public abstract void | setDebuggingInfo(boolean
Whether line number debugging information should be generated lines, boolean Whether variables debugging information should be generated vars, boolean Whether source file debugging information should be generated source)
|
| public final void | setProtectionDomainFactory(AbstractJavaSourceClassLoader.
|
| public abstract void | setSourceCharset(Charset
The character set to using when reading characters from a source file charset)
|
| public void | |
| public abstract void | |
| public abstract void | |
| private static File[] |
| protectionDomainFactory | back to summary |
|---|---|
| protected AbstractJavaSourceClassLoader. | |
| AbstractJavaSourceClassLoader | back to summary |
|---|---|
| public AbstractJavaSourceClassLoader() | |
| AbstractJavaSourceClassLoader | back to summary |
|---|---|
| public AbstractJavaSourceClassLoader(ClassLoader parentClassLoader) | |
| getResourceAsStream | back to summary |
|---|---|
| public InputStream getResourceAsStream(String name) Overrides java. Doc from java. Returns an input stream for reading the specified resource. The search order is described in the documentation for Resources in named modules are subject to the encapsulation rules
specified by
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) throws Exception Reads Java source code for a given class name, scan, parse, compile and load it into the virtual machine, and invoke its "main()" method with the given arguments. Usage is as follows:
java
| |
| setDebuggingInfo | back to summary |
|---|---|
public abstract void setDebuggingInfo(boolean lines, boolean vars, boolean source)
| |
| setProtectionDomainFactory | back to summary |
|---|---|
| public final void setProtectionDomainFactory(AbstractJavaSourceClassLoader. | |
| setSourceCharset | back to summary |
|---|---|
public abstract void setSourceCharset(Charset charset)
| |
| setSourceFileCharacterEncoding | back to summary |
|---|---|
public void setSourceFileCharacterEncoding(String charsetName)
| |
| setSourceFinder | back to summary |
|---|---|
public abstract void setSourceFinder(ResourceFinder sourceFinder)
| |
| setSourcePath | back to summary |
|---|---|
public abstract void setSourcePath(File[] sourcePath)
| |
| splitPath | back to summary |
|---|---|
| private static File[] splitPath(String string) | |
| Modifier and Type | Method and Description |
|---|---|
| public ProtectionDomain |
| getProtectionDomain | back to summary |
|---|---|
public ProtectionDomain getProtectionDomain(String sourceResourceName)
| |