org.codehaus.commons.compiler.IExpressionEvaluator , an org.codehaus.commons.compiler.IScriptEvaluator , an
org.codehaus.commons.compiler.IClassBodyEvaluator and an org.codehaus.commons.compiler.ISimpleCompiler . All of these adhere to the syntax of the Java programming
language.
There are (at least) two implementations of these interfaces available:
org.codehaus.janino: A lightweight, stand-alone implementation that implements Java 1.4 and most of Java
5. Runs on all JREs starting at version 1.3.
org.codehaus.commons.compiler.jdk: Uses the javax.tools.JavaCompiler API that is available
since Java 1.6. Requires a JDK (not just a JRE).
Notice: Implementations may or may not be prone to "Java injection", i.e. it may or may not be possible to, e.g.,
break out of the "expression" scope of an org. by providing
a "bogus" expression text. The documentation of each implementation should state clearly whether or not it is
prone to Java injection.
| Modifier and Type | Interface and Description |
|---|---|
| public interface | ErrorHandler
Processes an error issued by the compiler. |
| public interface | IClassBodyEvaluator
Parses a class body and returns it as a |
| public interface | ICompiler
A simplified substitute for the javac tool. |
| public interface | ICompilerFactory
An entity that produces implementations of |
| public interface | ICookable
An entity that processes a sequence of characters (a "document"). |
| public interface | IExpressionEvaluator
An engine that evaluates expressions in JVM bytecode. |
| public interface | |
| public interface | IScriptEvaluator
An engine that executes a script in JVM bytecode. |
| public interface | ISimpleCompiler
A simplified Java compiler that can compile only a single compilation unit. |
| public interface | WarningHandler
Processes a warning issued by the compiler. |
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | AbstractCompiler
A base class and wrapper for |
| public abstract class | AbstractCompilerFactory
Base class for a simple |
| public abstract class | AbstractJavaSourceClassLoader
A |
| public class | CompileException
Representation of an error condition during compilation. |
| public class | CompilerFactoryFactory
Utility class that finds implementations of |
| public abstract class | |
| public class | InternalCompilerException
Indicates an event that is probably related to a bug in JANINO. |
| public class | LocatedException
An |
| public class | Location
Immutable representation of the location of a character in a document, as defined by an (optional) file name, a line number and a column number. |
| public abstract class | MultiCookable
Implements all methods of |
| public class | Sandbox
Executes a |