Package org.codehaus.commons.compiler
package org.codehaus.commons.compiler
This package declares interfaces for the implementation of an
IExpressionEvaluator, an IScriptEvaluator, an
IClassBodyEvaluator and an 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, available at janino.net: A lightweight, stand-alone implementation that implements Java 1.4 and half of Java 5. Runs on all JREs starting at version 1.3. -
org.codehaus.commons.compiler.jdk, also available at janino.net: Uses thejavax.tools.JavaCompilerAPI that is available since Java 1.6. Requires a JDK (not just a JRE).
IExpressionEvaluator by providing a
"bogus" expression text. The documentation of each implementation should state clearly whether or not it is prone to
Java injection.-
ClassDescriptionBase class for a simple
ICompilerFactory.AClassLoaderthat, unlike usualClassLoaders, does not load byte code, but reads Java™ source code and then scans, parses, compiles and loads it into the virtual machine.An exception that reflects an error during compilation.Utility class that finds implementations ofICompilerFactorys.Base class for a simpleICookable.Parses a class body and returns it as aClassobject ready for use with java.lang.reflect.An entity that produces implementations ofIExpressionEvaluator,IScriptEvaluator,IClassBodyEvaluator,ISimpleCompilerorAbstractJavaSourceClassLoader."Cooking" means scanning a sequence of characters and turning them into some JVM-executable artifact.An engine that evaluates expressions in Java™ bytecode.An engine that executes a script in Java™ bytecode.A simplified Java™ compiler that can compile only a single compilation unit.Represents the location of a character in a document, as defined by an optional file name, a line number and a column number.A helper class that wraps primitive values in their wrapper classes.