Package org.apache.commons.jci.compilers
Class AbstractJavaCompiler
- java.lang.Object
-
- org.apache.commons.jci.compilers.AbstractJavaCompiler
-
- All Implemented Interfaces:
JavaCompiler
- Direct Known Subclasses:
EclipseJavaCompiler
,GroovyJavaCompiler
,JaninoJavaCompiler
,RhinoJavaCompiler
public abstract class AbstractJavaCompiler extends java.lang.Object implements JavaCompiler
Base class for compiler implementations. Provides just a few convenience methods.- Author:
- tcurdt
-
-
Field Summary
Fields Modifier and Type Field Description protected CompilationProblemHandler
problemHandler
-
Constructor Summary
Constructors Constructor Description AbstractJavaCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompilationResult
compile(java.lang.String[] pClazzNames, ResourceReader pReader, ResourceStore pStore)
uses the default compiler settings and the current classloaderCompilationResult
compile(java.lang.String[] pClazzNames, ResourceReader pReader, ResourceStore pStore, java.lang.ClassLoader pClassLoader)
uses the default compiler settingsvoid
setCompilationProblemHandler(CompilationProblemHandler pHandler)
Set the the handler that gets the notification of an error or warning as soon as this information is available from the compiler.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.jci.compilers.JavaCompiler
compile, createDefaultSettings
-
-
-
-
Field Detail
-
problemHandler
protected CompilationProblemHandler problemHandler
-
-
Method Detail
-
setCompilationProblemHandler
public void setCompilationProblemHandler(CompilationProblemHandler pHandler)
Description copied from interface:JavaCompiler
Set the the handler that gets the notification of an error or warning as soon as this information is available from the compiler. Note: Some compilers might not support this feature.- Specified by:
setCompilationProblemHandler
in interfaceJavaCompiler
-
compile
public CompilationResult compile(java.lang.String[] pClazzNames, ResourceReader pReader, ResourceStore pStore)
Description copied from interface:JavaCompiler
uses the default compiler settings and the current classloader- Specified by:
compile
in interfaceJavaCompiler
-
compile
public CompilationResult compile(java.lang.String[] pClazzNames, ResourceReader pReader, ResourceStore pStore, java.lang.ClassLoader pClassLoader)
Description copied from interface:JavaCompiler
uses the default compiler settings- Specified by:
compile
in interfaceJavaCompiler
-
-