Package oms3.compiler
Class Compiler
- java.lang.Object
-
- oms3.compiler.Compiler
-
public final class Compiler extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>compileSource(String name, String code)Compiles a single source file and loads the class with a default class loader.Class<?>getCompiledClass(String name)static Compilersingleton(URLClassLoader parent)
-
-
-
Method Detail
-
singleton
public static Compiler singleton(URLClassLoader parent)
-
compileSource
public Class<?> compileSource(String name, String code) throws Exception
Compiles a single source file and loads the class with a default class loader. The default class loader is the one used to load the test case class.- Parameters:
name- the name of the class to compile.code- the source code of the class.- Returns:
- the compiled class.
- Throws:
Exception
-
-