Opposed to a normal ".java" file, you can declare multiple public classes here.
To set up an ISimpleCompiler object, proceed as follows:
ISimpleCompiler-implementing objectsetParentClassLoader(ClassLoader).ICookable#cook(String, Reader) methods to scan, parse, compile and load the compilation
unit into the JVM.
getClassLoader() to obtain a ClassLoader that you can use to access the compiled classes.
The methods setPermissions(Permissions permissions) and void setNoPermissions() were removed in
version 3.1.1 (2020-03-09) and replaced by the Sandbox.
| Modifier and Type | Method and Description |
|---|---|
| public ClassLoader | getClassLoader()
Returns a |
| public void | setCompileErrorHandler(ErrorHandler
null to restore the default behavior (throwing a CompileException)Installs an |
| public void | setDebuggingInformation(boolean debugSource, boolean debugLines, boolean debugVars)
Determines what kind of debugging information is included in the generates classes. |
| public void | setParentClassLoader(ClassLoader parentClassLoader)
The "parent class loader" is used to load referenced classes. |
| public void | setWarningHandler(WarningHandler
null to indicate that no warnings be issuedBy default, warnings are discarded, but an application my install a custom |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Returns a
This method must only be called after exactly one of the | |
| setCompileErrorHandler | back to summary |
|---|---|
| public void setCompileErrorHandler(ErrorHandler compileErrorHandler) Installs an
If the given
If the given
In other words: The
| |
| setDebuggingInformation | back to summary |
|---|---|
| public void setDebuggingInformation(boolean debugSource, boolean debugLines, boolean debugVars) Determines what kind of debugging information is included in the generates classes. The default is typically
" | |
| setParentClassLoader | back to summary | ||||||
|---|---|---|---|---|---|---|---|
| public void setParentClassLoader(ClassLoader parentClassLoader) The "parent class loader" is used to load referenced classes. Useful values are:
The parent class loader defaults to the current thread's context class loader. | |||||||
| setWarningHandler | back to summary |
|---|---|
| public void setWarningHandler(WarningHandler warningHandler) By default, warnings are discarded, but an application my install a custom
| |