|
Web Site | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.janino.UnitCompiler
This class actually implements the JavaTM compiler. It is associated with exactly one compilation unit which it compiles.
Nested Class Summary | |
static interface |
UnitCompiler.ErrorHandler
Interface type for setCompileErrorHandler(org.codehaus.janino.UnitCompiler.ErrorHandler) . |
static class |
UnitCompiler.SimpleIField
Short-hand implementation of IClass.IField that implements a
non-constant, non-static, package-accessible field. |
Constructor Summary | |
UnitCompiler(Java.CompilationUnit compilationUnit,
IClassLoader iClassLoader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnitCompiler(Java.CompilationUnit compilationUnit, IClassLoader iClassLoader)
Method Detail |
public ClassFile[] compileUnit(DebuggingInformation debuggingInformation) throws CompileException
ClassFile
objects which represent the classes and
interfaces defined in the compilation unit.
CompileException
public void compile2(Java.ClassDeclaration cd) throws CompileException
CompileException
public void compile2(Java.AnonymousClassDeclaration acd) throws CompileException
CompileException
public void compile2(Java.LocalClassDeclaration lcd) throws CompileException
CompileException
public void compile2(Java.MemberClassDeclaration mcd) throws CompileException
CompileException
public void compile2(Java.InterfaceDeclaration id) throws CompileException
CompileException
public boolean generatesCode2(Java.BlockStatement bs)
public boolean generatesCode2(Java.EmptyStatement es)
public boolean generatesCode2(Java.LocalClassDeclarationStatement lcds)
public boolean generatesCode2(Java.Initializer i) throws CompileException
CompileException
public boolean generatesCode2(Java.Block b) throws CompileException
CompileException
public boolean generatesCode2(Java.FieldDeclarator fd) throws CompileException
CompileException
public void leave2(Java.BlockStatement bs, IClass optionalStackValueType)
public void leave2(Java.SynchronizedStatement ss, IClass optionalStackValueType)
public void leave2(Java.TryStatement ts, IClass optionalStackValueType)
public final Java.Lvalue toLvalueOrCE(Java.Atom a) throws CompileException
CompileException
public IClass.IMethod toIMethod(Java.MethodDeclarator md)
public IClass importTypeOnDemand(String simpleTypeName, Location location) throws CompileException
null
if the given simpleTypeName
cannot be resolved through any of the import-on-demand directives
CompileException
public IClass findClass(String className)
className
- Fully qualified class name, e.g. "pkg1.pkg2.Outer$Inner".
null
if a class with that name is not declared in this compilation unitpublic void setCompileErrorHandler(UnitCompiler.ErrorHandler errorHandler)
CompileException
s are thrown on compile errors, but an application
my install its own (thread-local) UnitCompiler.ErrorHandler
.
Be aware that a single problem during compilation often causes a bunch of compile errors,
so a good UnitCompiler.ErrorHandler
counts errors and throws a CompileException
when
a limit is reached.
public void setWarningHandler(WarningHandler warningHandler)
WarningHandler
.
public CodeContext.Offset getWhereToBreak(Java.BreakableStatement bs)
|
Web Site | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |