Package velo.ladealpha.fields.services
Class RuntimeCompiler
java.lang.Object
velo.ladealpha.fields.services.RuntimeCompiler
The Class RuntimeCompiler.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a class with the given name and source code to be compiled with the next call tocompile().Class<?>getCompiledClass(String className) Obtain a class that was previously compiled by adding it withaddClass(String, String)and callingcompile(). 
- 
Constructor Details
- 
RuntimeCompiler
public RuntimeCompiler()Creates a new RuntimeCompiler.- Throws:
 NullPointerException- If no JavaCompiler could be obtained. This is the case when the application was not started with a JDK, but only with a JRE. (More specifically: When the JDK tools are not in the classpath).
 
 - 
 - 
Method Details
- 
addClass
Add a class with the given name and source code to be compiled with the next call tocompile().- Parameters:
 className- The class namecode- The code of the class
 - 
getCompiledClass
Obtain a class that was previously compiled by adding it withaddClass(String, String)and callingcompile().- Parameters:
 className- The class name- Returns:
 - The class. Returns 
nullif the compilation failed. 
 
 -