| Package | Description |
|---|---|
| org.codehaus.commons.compiler |
This package declares interfaces for the implementation of an
IExpressionEvaluator, an IScriptEvaluator, an
IClassBodyEvaluator and an ISimpleCompiler. |
| org.codehaus.commons.compiler.io | |
| org.codehaus.commons.compiler.util | |
| org.codehaus.commons.compiler.util.iterator | |
| org.codehaus.commons.compiler.util.reflect | |
| org.codehaus.commons.compiler.util.resource |
Classes related to loading "resources" (
ResourceFinder) and
creating resources (ResourceCreator). |
| Modifier and Type | Field and Description |
|---|---|
protected File[] |
AbstractCompiler.bootClassPath
This is always non-
null for JVMs that support BOOTCLASSPATH (1.0-1.8), and
this is always null for JVMs that don't (9+). |
protected ErrorHandler |
AbstractCompiler.compileErrorHandler |
static File |
ICompiler.NO_DESTINATION_DIRECTORY
Special value for
ICompiler.setDestinationDirectory(File, boolean)'s first parameter: Indicates that .class files
are to be created in the directory of the .java file from which they are generated. |
protected AbstractJavaSourceClassLoader.ProtectionDomainFactory |
AbstractJavaSourceClassLoader.optionalProtectionDomainFactory |
protected WarningHandler |
AbstractCompiler.warningHandler |
| Modifier and Type | Method and Description |
|---|---|
Object |
IScriptEvaluator.evaluate(int idx,
Object[] arguments)
Same as
IScriptEvaluator.evaluate(Object[]), but for multiple scripts. |
Object |
IScriptEvaluator.evaluate(Object[] arguments)
Calls the script with concrete parameter values.
|
Object |
IExpressionEvaluator.evaluate(Object[] arguments)
Evaluates the expression with concrete parameter values.
|
String |
Location.getFileName() |
Location |
LocatedException.getLocation() |
| Modifier and Type | Method and Description |
|---|---|
void |
ICookable.cook(InputStream is,
String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given
InputStream with the given encoding. |
void |
Cookable.cook(InputStream is,
String optionalEncoding) |
void |
IScriptEvaluator.cook(String[] optionalFileNames,
Reader[] readers)
Same as
ICookable.cook(String, Reader), but cooks a set of scripts into one class. |
void |
IScriptEvaluator.cook(String[] optionalFileNames,
String[] strings)
Same as
ICookable.cook(String, String), but for multiple scripts. |
void |
ICookable.cook(String optionalFileName,
InputStream is)
Reads, scans, parses and compiles Java tokens from the given
InputStream, encoded
in the "platform default encoding". |
void |
Cookable.cook(String optionalFileName,
InputStream is) |
void |
ICookable.cook(String optionalFileName,
InputStream is,
String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given
InputStream with the given encoding. |
void |
ICookable.cook(String optionalFileName,
InputStream is,
String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given
InputStream with the given encoding. |
void |
Cookable.cook(String optionalFileName,
InputStream is,
String optionalEncoding) |
void |
Cookable.cook(String optionalFileName,
InputStream is,
String optionalEncoding) |
void |
ICookable.cook(String optionalFileName,
Reader r)
Reads, scans, parses and compiles Java tokens from the given
Reader. |
void |
ICookable.cook(String optionalFileName,
String s)
Reads, scans, parses and compiles Java tokens from the given
String. |
void |
Cookable.cook(String optionalFileName,
String s) |
void |
ICookable.cookFile(File file,
String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given
File with the given encoding. |
void |
Cookable.cookFile(File file,
String optionalEncoding) |
void |
ICookable.cookFile(String fileName,
String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the named file with the given optionalEncoding.
|
void |
Cookable.cookFile(String fileName,
String optionalEncoding) |
Object |
IScriptEvaluator.evaluate(int idx,
Object[] arguments)
Same as
IScriptEvaluator.evaluate(Object[]), but for multiple scripts. |
Object |
IScriptEvaluator.evaluate(Object[] arguments)
Calls the script with concrete parameter values.
|
Object |
IExpressionEvaluator.evaluate(Object[] arguments)
Evaluates the expression with concrete parameter values.
|
void |
ErrorHandler.handleError(String message,
Location optionalLocation)
May or may not choose to throw a
CompileException. |
void |
WarningHandler.handleWarning(String handle,
String message,
Location optionalLocation)
May or may not choose to throw a
CompileException. |
void |
WarningHandler.handleWarning(String handle,
String message,
Location optionalLocation)
May or may not choose to throw a
CompileException. |
void |
ICompiler.setCharacterEncoding(String characterEncoding)
Equivalent with
setEncoding(Charset.forName(characterEncoding)). |
void |
AbstractCompiler.setCharacterEncoding(String characterEncoding) |
void |
ICookable.setCompileErrorHandler(ErrorHandler optionalCompileErrorHandler)
By default,
CompileExceptions are thrown on compile errors, but an application my install its own
ErrorHandler. |
void |
ICompiler.setCompileErrorHandler(ErrorHandler errorHandler)
By default,
CompileExceptions are thrown on compile errors, but an application my install its own
ErrorHandler. |
void |
AbstractCompiler.setCompileErrorHandler(ErrorHandler compileErrorHandler) |
void |
IClassBodyEvaluator.setDefaultImports(String... optionalDefaultImports)
"Default imports" add to the system import "java.lang", i.e. the evaluator may refer to classes imported by
default imports without having to explicitly declare IMPORT statements.
|
void |
ICompiler.setDestinationDirectory(File destinationDirectory,
boolean rebuild)
Equivalent of
-d and
-rebuild. |
void |
AbstractCompiler.setDestinationDirectory(File destinationDirectory,
boolean rebuild) |
void |
IClassBodyEvaluator.setExtendedClass(Class<?> optionalExtendedClass)
Sets a particular superclass that the generated class will extend.
|
void |
IClassBodyEvaluator.setExtendedType(Class<?> optionalExtendedClass)
Deprecated.
Use
IClassBodyEvaluator.setExtendedClass(Class) instead |
void |
ICookable.setParentClassLoader(ClassLoader optionalParentClassLoader)
The "parent class loader" is used to load referenced classes.
|
void |
AbstractJavaSourceClassLoader.setProtectionDomainFactory(AbstractJavaSourceClassLoader.ProtectionDomainFactory optionalProtectionDomainFactory) |
abstract void |
AbstractJavaSourceClassLoader.setSourceFileCharacterEncoding(String optionalCharacterEncoding) |
void |
ICookable.setWarningHandler(WarningHandler optionalWarningHandler)
By default, warnings are discarded, but an application my install a custom
WarningHandler. |
void |
AbstractCompiler.setWarningHandler(WarningHandler warningHandler) |
| Constructor and Description |
|---|
CompileException(String message,
Location optionalLocation) |
CompileException(String message,
Location optionalLocation,
Throwable cause) |
InternalCompilerException(String message) |
InternalCompilerException(String message,
Throwable t) |
LocatedException(String message,
Location optionalLocation) |
LocatedException(String message,
Location optionalLocation,
Throwable optionalCause) |
LocatedException(String message,
Location optionalLocation,
Throwable optionalCause) |
Location(String optionalFileName,
int lineNumber,
int columnNumber) |
| Modifier and Type | Method and Description |
|---|---|
int |
TeeReader.read(char[] cbuf,
int off,
int len) |
| Modifier and Type | Method and Description |
|---|---|
static File[] |
StringUtil.parseOptionalPath(String s)
|
T |
Producer.produce()
Produces the next object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Predicate.evaluate(T subject) |
protected Class<?> |
ResourceFinderClassLoader.findClass(String className) |
static <T> T |
Objects.or(T lhs,
T rhs) |
static File[] |
StringUtil.parseOptionalPath(String s)
|
static int |
Numbers.parseUnsignedInt(String s,
int radix)
Counterpart of
Integer.parseInt(String, int) for parsing unsigned integers. |
static long |
Numbers.parseUnsignedLong(String s,
int radix)
Counterpart of
Long.parseLong(String, int) for parsing unsigned integers. |
void |
Benchmark.report(String optionalTitle,
Object o)
Reports the
title, a colon, a space, and the pretty-printed Object. |
void |
Benchmark.report(String optionalTitle,
Object o)
Reports the
title, a colon, a space, and the pretty-printed Object. |
| Constructor and Description |
|---|
StringPattern(String pattern) |
| Modifier and Type | Method and Description |
|---|---|
void |
FilterListIterator.add(T o)
Calls
FilterListIterator.delegate. |
void |
FilterListIterator.set(T o)
Calls
FilterListIterator.delegate. |
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
ByteArrayClassLoader.findClass(String name)
Implements
ClassLoader.findClass(String). |
static <R,EX extends Throwable> |
Methods.invoke(Method method,
Object obj,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
Resource |
MapResourceFinder.addResource(String fileName,
byte[] data) |
Resource |
MapResourceFinder.addResource(String fileName,
String data) |
Resource |
ZipFileResourceFinder.findResource(String resourceName) |
abstract Resource |
ResourceFinder.findResource(String resourceName)
Finds a resource by name and return it as a
Resource object. |
Resource |
MultiResourceFinder.findResource(String resourceName) |
Resource |
MapResourceFinder.findResource(String resourceName) |
Resource |
FileResourceFinder.findResource(String resourceName) |
protected abstract File |
FileResourceFinder.findResourceAsFile(String resourceName)
Converts a given resource resource name into a
File. |
protected File |
DirectoryResourceFinder.findResourceAsFile(String resourceName) |
InputStream |
ResourceFinder.findResourceAsStream(String resourceName)
Finds a resource by name and open it for reading.
|
Iterable<Resource> |
MultiResourceFinder.list(String resourceNamePrefix,
boolean recurse) |
Iterable<Resource> |
MapResourceFinder.list(String resourceNamePrefix,
boolean recurse) |
abstract Iterable<Resource> |
ListableResourceFinder.list(String resourceNamePrefix,
boolean recurse) |
Iterable<Resource> |
DirectoryResourceFinder.list(String resourceNamePrefix,
boolean recurse) |
Copyright © 2019. All rights reserved.