Uses of Class
org.codehaus.commons.compiler.CompileException
Packages that use CompileException
Package
Description
This package declares interfaces for the implementation of an
IExpressionEvaluator, an IScriptEvaluator, an
IClassBodyEvaluator and an ISimpleCompiler.An implementation of the
org.codehaus.commons.compiler API that uses the "JAVAC" Java compiler that is
part of the "Java Development Kit" (JDK).The core of the Janino Java compiler.
Sample applications for the Janino Java compiler.
Application-independent helper classes.
-
Uses of CompileException in org.codehaus.commons.compiler
Methods in org.codehaus.commons.compiler that throw CompileExceptionModifier and TypeMethodDescriptionfinal booleanbooleanReads a set of Java compilation units (a.k.a.voidfinal voidCookable.cook(InputStream is) final voidCookable.cook(InputStream is, String encoding) final voidfinal voidfinal voidCookable.cook(String fileName, InputStream is) final voidCookable.cook(String fileName, InputStream is, String encoding) abstract voidfinal voidvoidICookable.cook(InputStream is) Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidICookable.cook(InputStream is, String encoding) Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.voidReads, scans, parses and compiles Java tokens from the givenReader.voidReads, scans, parses and compiles Java tokens from the givenString.voidICookable.cook(String fileName, InputStream is) Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidICookable.cook(String fileName, InputStream is, String encoding) Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.voidReads, scans, parses and compiles Java tokens from the givenReader.voidReads, scans, parses and compiles Java tokens from the givenString.voidIMultiCookable.cook(InputStream... inputStreams) Same asCookable.cook(InputStream), but cooks a set of documents into one class.voidIMultiCookable.cook(InputStream[] inputStreams, String[] encodings) Same asCookable.cook(InputStream, String), but cooks a set of documents into one class.voidSame asCookable.cook(Reader), but cooks a set of documents into one class.voidSame asCookable.cook(String), but cooks a set of documents into one class.voidIMultiCookable.cook(String[] fileNames, InputStream[] inputStreams) Same asCookable.cook(String, InputStream), but cooks a set of documents into one class.voidIMultiCookable.cook(String[] fileNames, InputStream[] inputStreams, String[] encodings) Same asCookable.cook(String, InputStream, String), but cooks a set of documents into one class.voidSame asCookable.cook(String, Reader), but cooks a set of documents into one class.voidSame asCookable.cook(String, String), but cooks a set of documents into one class.voidSame asICookable.cook(Reader), but for multiple scripts.voidSame asICookable.cook(String), but for multiple scripts.voidSame asICookable.cook(String, Reader), but cooks a set of scripts into one class.voidSame asICookable.cook(String, String), but for multiple scripts.final voidMultiCookable.cook(InputStream... inputStreams) final voidMultiCookable.cook(InputStream[] inputStreams, String[] encodings) final voidfinal voidfinal voidMultiCookable.cook(String[] fileNames, InputStream[] inputStreams) final voidMultiCookable.cook(String[] fileNames, InputStream[] inputStreams, String[] encodings) abstract voidfinal voidfinal voidfinal voidfinal voidfinal voidvoidReads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".voidReads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.voidReads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".voidReads, scans, parses and compiles Java tokens from the named file with the given encoding.voidSame asCookable.cookFile(File), but cooks a set of documents into one class.voidSame asCookable.cookFile(File, String), but cooks a set of documents into one class.voidSame asCookable.cookFile(String), but cooks a set of documents into one class.voidSame asCookable.cookFile(String, String), but cooks a set of documents into one class.final voidfinal voidfinal voidfinal void<T> TIExpressionEvaluator.createFastEvaluator(Reader reader, Class<? extends T> interfaceToImplement, String... parameterNames) <T> TIExpressionEvaluator.createFastEvaluator(String expression, Class<? extends T> interfaceToImplement, String... parameterNames) If the parameter and return types of the expression are known at compile time, then a "fast" expression evaluator can be instantiated throughIExpressionEvaluator.createFastEvaluator(String, Class, String[]).<T> TIScriptEvaluator.createFastEvaluator(Reader reader, Class<T> interfaceToImplement, String[] parameterNames) If the parameter and return types of the expression are known at compile time, then a "fast" script evaluator can be instantiated through this method.<T> TIScriptEvaluator.createFastEvaluator(String script, Class<T> interfaceToImplement, String[] parameterNames) IClassBodyEvaluator.createInstance(Reader reader) Scans, parses and compiles a class body from the tokens delivered by the the givenReader, then creates and returns an instance of that class.voidErrorHandler.handleError(String message, Location location) May or may not choose to throw aCompileException.voidWarningHandler.handleWarning(String handle, String message, Location location) May or may not choose to throw aCompileException. -
Uses of CompileException in org.codehaus.commons.compiler.jdk
Methods in org.codehaus.commons.compiler.jdk that throw CompileExceptionModifier and TypeMethodDescription(package private) static voidCompiler.compile(JavaCompiler compiler, List<String> options, Collection<JavaFileObject> sourceFileObjects, JavaFileManager fileManager, ErrorHandler compileErrorHandler, WarningHandler warningHandler, SortedSet<Location> offsets) Compiles on theJavaFileManager/JavaFileObjectlevel.(package private) static voidCompiler.compile(JavaCompiler compiler, List<String> options, ResourceFinder sourceFinder, Charset sourceFileCharset, ResourceFinder classFileFinder, ResourceCreator classFileCreator, Resource[] sourceFiles, ErrorHandler compileErrorHandler, WarningHandler warningHandler, SortedSet<Location> offsets) voidvoidvoidprotected voidvoidvoidvoidprotected final voidvoidvoid<T> TExpressionEvaluator.createFastEvaluator(Reader reader, Class<? extends T> interfaceToImplement, String... parameterNames) <T> TExpressionEvaluator.createFastEvaluator(String expression, Class<? extends T> interfaceToImplement, String... parameterNames) <T> TScriptEvaluator.createFastEvaluator(Reader r, Class<T> interfaceToImplement, String[] parameterNames) <T> TScriptEvaluator.createFastEvaluator(String script, Class<T> interfaceToImplement, String[] parameterNames) ClassBodyEvaluator.createInstance(Reader reader) Constructors in org.codehaus.commons.compiler.jdk that throw CompileExceptionModifierConstructorDescriptionExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes) Equivalent toExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, Class<?> extendedType, Class<?>[] implementedTypes, ClassLoader parentClassLoader) Equivalent toExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(String script) Equivalent toScriptEvaluator(String fileName, InputStream is, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(String fileName, Reader reader, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(String script, Class<?> returnType) Equivalent toScriptEvaluator(String script, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes) Equivalent toScriptEvaluator(String script, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions) Equivalent to -
Uses of CompileException in org.codehaus.janino
Methods in org.codehaus.janino that return CompileExceptionModifier and TypeMethodDescriptionprotected final CompileExceptionParser.compileException(String message) Convenience method for throwing aCompileException.protected static CompileExceptionParser.compileException(String message, Location location) Convenience method for throwing aCompileException.protected final CompileExceptionTokenStreamImpl.compileException(String message) Convenience method for throwing aCompileException.private static CompileExceptionUnitCompiler.compileException(Java.Locatable locatable, String message) Methods in org.codehaus.janino that throw CompileExceptionModifier and TypeMethodDescriptionprivate shortUnitCompiler.accessFlags(Java.Modifier[] modifiers) private voidUnitCompiler.addFields(Java.FieldDeclaration fd, ClassFile cf) Creates and addsClassFile.FieldInfos to the cf for all fields declared by the fd.private static ClassFile.MethodInfoUnitCompiler.addMethodInfo(Java.Locatable locatable, ClassFile classFile, short accessFlags, String methodName, MethodDescriptor methodMd) private Java.Modifier[]Parser.annotationTypeElementModifiers(Java.Modifier[] modifiers) private voidUnitCompiler.assignmentConversion(Java.Locatable locatable, IType sourceType, IType targetType, Object constantValue) Implements "assignment conversion" (JLS7 5.2) (more precisely: "assignment contexts".)(package private) voidUnitCompiler.assignSyntheticParametersToSyntheticFields(Java.ConstructorDeclarator cd) Copies the values of the synthetic parameters of this constructor ("this$..." and "val$...") to the synthetic fields of the object ("this$..." and "val$...").private IClassUnitCompiler.binaryNumericPromotionType(Java.Locatable locatable, IType type1, IType type2) private voidUnitCompiler.buildLocalVariableMap(Java.Block block, Map<String, Java.LocalVariable> localVars) private Map<String, Java.LocalVariable> UnitCompiler.buildLocalVariableMap(Java.BlockStatement blockStatement, Map<String, Java.LocalVariable> localVars) Computes and fills in the 'local variable map' for the given blockStatement.protected voidUnitCompiler.buildLocalVariableMap(Java.CatchClause catchClause, Map<String, Java.LocalVariable> localVars) Adds the given localVars to the 'local variable map' of the given catchClause.private voidUnitCompiler.buildLocalVariableMap(Java.DoStatement ds, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.ForEachStatement fes, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.ForStatement fs, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.FunctionDeclarator fd) private voidUnitCompiler.buildLocalVariableMap(Java.IfStatement is, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.Initializer i, Map<String, Java.LocalVariable> localVars) private Map<String, Java.LocalVariable> UnitCompiler.buildLocalVariableMap(Java.LabeledStatement ls, Map<String, Java.LocalVariable> localVars) private Map<String, Java.LocalVariable> UnitCompiler.buildLocalVariableMap(Java.LocalVariableDeclarationStatement lvds, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.SwitchStatement ss, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.SynchronizedStatement ss, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.TryStatement ts, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.buildLocalVariableMap(Java.WhileStatement ws, Map<String, Java.LocalVariable> localVars) private voidUnitCompiler.castConversion(Java.Locatable locatable, IType sourceType, IType targetType, Object constantValue) private voidUnitCompiler.checkAccessible(IClass.IMember member, Java.Scope contextScope, Location location) Checks whether the givenIClass.IMemberis accessible in the given context, according to JLS7 6.6.1.BL1.B4.private voidUnitCompiler.checkAccessible(IClass type, Java.Scope contextScope, Location location) Checks whether the givenIClassis accessible in the given context, according to JLS7 6.6.1.2 and 6.6.1.4.private voidUnitCompiler.checkForConflictWithSingleTypeImport(String name, Location location) private voidUnitCompiler.checkForNameConflictWithAnotherPackageMemberTypeDeclaration(Java.PackageMemberTypeDeclaration pmtd) private voidUnitCompiler.checkMemberAccessible(IClass iClassDeclaringMember, IClass.IMember member, Java.Scope contextScope, Location location) Verifies that a member (class, interface, field or method) declared in a given class is accessible from a given block statement context, according to JLS7 6.6.1.4.private Java.Modifier[]Parser.checkModifiers(Java.Modifier[] modifiers, String... allowedKeywords) Verifies that the modifiers are consistent.private voidUnitCompiler.checkThrownException(Java.Locatable locatable, IType type, Java.Scope scope) private voidUnitCompiler.checkThrownExceptions(Java.Invocation in, IClass.IMethod iMethod) private Java.Modifier[]Parser.classModifiers(Java.Modifier[] modifiers) private ITypeUnitCompiler.commonSupertype(IType t1, IType t2) private ITypeUnitCompiler.commonSupertype2(IType t1, IType t2) voidvoidUnitCompiler.Compilable.compile()booleanUnitCompiler.Compilable2.compile()private voidUnitCompiler.compile(Java.ArrayInitializerOrRvalue aiorv, IType arrayType) private booleanUnitCompiler.compile(Java.BlockStatement bs) private voidUnitCompiler.compile(Java.FunctionDeclarator fd, ClassFile classFile) private voidUnitCompiler.compile(Java.Rvalue rv) SomeJava.Rvalues compile more efficiently when their value is not needed, e.g.private voidUnitCompiler.compile(Java.TypeDeclaration td) private voidprivate voidUnitCompiler.compile2(Java.AbstractClassDeclaration cd) private booleanUnitCompiler.compile2(Java.AlternateConstructorInvocation aci) private voidUnitCompiler.compile2(Java.AnonymousClassDeclaration acd) private booleanUnitCompiler.compile2(Java.AssertStatement as) private voidUnitCompiler.compile2(Java.Assignment a) private booleanUnitCompiler.compile2(Java.Block b) private booleanUnitCompiler.compile2(Java.BreakStatement bs) private voidUnitCompiler.compile2(Java.CompilationUnit cu) Compiles an (ordinary, not modular) compilation unitprivate booleanUnitCompiler.compile2(Java.ContinueStatement cs) private voidUnitCompiler.compile2(Java.Crement c) private booleanUnitCompiler.compile2(Java.DoStatement ds) private booleanUnitCompiler.compile2(Java.ExpressionStatement ee) private booleanUnitCompiler.compile2(Java.FieldDeclaration fd) private booleanUnitCompiler.compile2(Java.ForEachStatement fes) private booleanUnitCompiler.compile2(Java.ForStatement fs) private voidUnitCompiler.compile2(Java.FunctionDeclarator fd, ClassFile classFile) private booleanUnitCompiler.compile2(Java.IfStatement is) private booleanUnitCompiler.compile2(Java.Initializer i) private voidUnitCompiler.compile2(Java.InnerClassDeclaration icd) private voidUnitCompiler.compile2(Java.InterfaceDeclaration id) private booleanUnitCompiler.compile2(Java.LabeledStatement ls) private voidUnitCompiler.compile2(Java.LocalClassDeclaration lcd) private booleanUnitCompiler.compile2(Java.LocalClassDeclarationStatement lcds) private booleanUnitCompiler.compile2(Java.LocalVariableDeclarationStatement lvds) private voidUnitCompiler.compile2(Java.ModularCompilationUnit mcu) private voidUnitCompiler.compile2(Java.PackageMemberClassDeclaration pmcd) Compiles a top-level class or enum declaration.private voidUnitCompiler.compile2(Java.PackageMemberInterfaceDeclaration pmid) Compiles a top-level interface or annotation type declaration.private voidUnitCompiler.compile2(Java.ParenthesizedExpression pe) private booleanUnitCompiler.compile2(Java.ReturnStatement rs) private voidUnitCompiler.compile2(Java.Rvalue rv) private booleanUnitCompiler.compile2(Java.SuperConstructorInvocation sci) private booleanUnitCompiler.compile2(Java.SwitchStatement ss) private booleanUnitCompiler.compile2(Java.SynchronizedStatement ss) private booleanUnitCompiler.compile2(Java.ThrowStatement ts) private booleanUnitCompiler.compile2(Java.TryStatement ts) private booleanUnitCompiler.compile2(Java.WhileStatement ws) private voidUnitCompiler.compileAnnotations(Java.Annotation[] annotations, Annotatable target, ClassFile cf) Converts and adds the annotations to the target.private ITypeUnitCompiler.compileArithmeticBinaryOperation(Java.Locatable locatable, IType lhsType, String operator, Java.Rvalue rhs) The LHS operand of type lhsType is expected on the stack.private ITypeUnitCompiler.compileArithmeticOperation(Java.Locatable locatable, IType firstOperandType, Iterator<Java.Rvalue> operands, String operator) Executes an arithmetic operation on a sequence of operands.private voidUnitCompiler.compileBoolean(Java.Rvalue rv, CodeContext.Offset dst, boolean orientation) Compiles anJava.Rvalueand branches, depending on the value.private voidUnitCompiler.compileBoolean2(Java.BinaryOperation bo, CodeContext.Offset dst, boolean orientation) private voidUnitCompiler.compileBoolean2(Java.ParenthesizedExpression pe, CodeContext.Offset dst, boolean orientation) private voidUnitCompiler.compileBoolean2(Java.Rvalue rv, CodeContext.Offset dst, boolean orientation) private voidUnitCompiler.compileBoolean2(Java.UnaryOperation ue, CodeContext.Offset dst, boolean orientation) private intUnitCompiler.compileContext(Java.Rvalue rv) Generates code that determines the context of theJava.Rvalueand puts it on the operand stack.private intUnitCompiler.compileContext2(Java.AmbiguousName an) private intUnitCompiler.compileContext2(Java.ArrayAccessExpression aae) Array access expression; see JLS7 15.13 / JLS8+ 15.10.3.private intUnitCompiler.compileContext2(Java.ArrayLength al) private intUnitCompiler.compileContext2(Java.FieldAccess fa) private intUnitCompiler.compileContext2(Java.FieldAccessExpression fae) private intUnitCompiler.compileContext2(Java.ParenthesizedExpression pe) private intUnitCompiler.compileContext2(Java.SuperclassFieldAccessExpression scfae) private voidUnitCompiler.compileDeclaredMemberTypes(Java.TypeDeclaration decl, ClassFile cf) Compiles all of the types for this declarationprivate voidUnitCompiler.compileDeclaredMethods(Java.TypeDeclaration typeDeclaration, ClassFile cf) Compiles all of the methods for this declarationprivate voidUnitCompiler.compileDeclaredMethods(Java.TypeDeclaration typeDeclaration, ClassFile cf, int startPos) Compiles methods for this declaration starting at startPos.private ClassFile.ElementValueUnitCompiler.compileElementValue(Java.ElementValue elementValue, ClassFile cf, boolean compileAsArray) private voidUnitCompiler.compileError(String message) Equivalent withUnitCompiler.compileError(String, Location)with anulllocation argument.private voidUnitCompiler.compileError(String message, Location location) Issues a compile error with the given message.private ITypeUnitCompiler.compileGet(Java.Rvalue rv) Generates code that determines the value of theJava.Rvalueand puts it on the operand stack.private ITypeUnitCompiler.compileGet2(Java.AmbiguousName an) private ITypeUnitCompiler.compileGet2(Java.ArrayAccessExpression aae) private IClassUnitCompiler.compileGet2(Java.ArrayCreationReference acr) private ITypeUnitCompiler.compileGet2(Java.Assignment a) private ITypeUnitCompiler.compileGet2(Java.BinaryOperation bo) private IClassUnitCompiler.compileGet2(Java.BooleanRvalue brv) private ITypeUnitCompiler.compileGet2(Java.Cast c) private IClassUnitCompiler.compileGet2(Java.ClassInstanceCreationReference cicr) private IClassUnitCompiler.compileGet2(Java.ClassLiteral cl) private ITypeUnitCompiler.compileGet2(Java.ConditionalExpression ce) private ITypeUnitCompiler.compileGet2(Java.Crement c) private ITypeUnitCompiler.compileGet2(Java.FieldAccess fa) private ITypeUnitCompiler.compileGet2(Java.FieldAccessExpression fae) private IClassUnitCompiler.compileGet2(Java.Instanceof io) private IClassUnitCompiler.compileGet2(Java.LambdaExpression le) private IClassUnitCompiler.compileGet2(Java.Literal l) private IClassUnitCompiler.compileGet2(Java.MethodInvocation mi) private IClassUnitCompiler.compileGet2(Java.MethodReference mr) private IClassUnitCompiler.compileGet2(Java.NewAnonymousClassInstance naci) private IClassUnitCompiler.compileGet2(Java.NewArray na) private ITypeUnitCompiler.compileGet2(Java.NewClassInstance nci) private ITypeUnitCompiler.compileGet2(Java.NewInitializedArray nia) private ITypeUnitCompiler.compileGet2(Java.ParameterAccess pa) private ITypeUnitCompiler.compileGet2(Java.ParenthesizedExpression pe) private ITypeUnitCompiler.compileGet2(Java.QualifiedThisReference qtr) private IClassUnitCompiler.compileGet2(Java.SimpleConstant sl) private ITypeUnitCompiler.compileGet2(Java.SuperclassFieldAccessExpression scfae) private IClassUnitCompiler.compileGet2(Java.SuperclassMethodInvocation scmi) private IClassUnitCompiler.compileGet2(Java.ThisReference tr) private IClassUnitCompiler.compileGet2(Java.UnaryOperation uo) private voidUnitCompiler.compileGetValue(Java.ArrayInitializer ai, IType arrayType) private ITypeUnitCompiler.compileGetValue(Java.Rvalue rv) Convenience function that callsUnitCompiler.compileContext(Rvalue)andUnitCompiler.compileGet(Rvalue).private voidUnitCompiler.compileSet(Java.Lvalue lv) Generates code that stores a value in theJava.Lvalue.private voidUnitCompiler.compileSet2(Java.AmbiguousName an) private voidUnitCompiler.compileSet2(Java.ArrayAccessExpression aae) private voidUnitCompiler.compileSet2(Java.FieldAccess fa) private voidUnitCompiler.compileSet2(Java.FieldAccessExpression fae) private voidUnitCompiler.compileSet2(Java.ParenthesizedExpression pe) private voidUnitCompiler.compileSet2(Java.SuperclassFieldAccessExpression scfae) private booleanUnitCompiler.compileStatements(List<? extends Java.BlockStatement> statements) private IClassUnitCompiler.compileStringConcatenation(Java.Locatable locatable, IType type, Java.Rvalue secondOperand, Iterator<Java.Rvalue> operands) protected final ClassLoaderSimpleCompiler.compileToClassLoader(Java.AbstractCompilationUnit abstractCompilationUnit) Compiles the given compilation unit.private booleanUnitCompiler.compileTryCatch(Java.TryStatement tryStatement, UnitCompiler.Compilable2 compileBody, CodeContext.Offset beginningOfBody, CodeContext.Offset afterStatement) Generates code for a TRY statement without resources and without a FINALLY clause.private booleanUnitCompiler.compileTryCatchFinally(Java.TryStatement ts, UnitCompiler.Compilable2 compileBody, Java.BlockStatement finallY) Generates code for a TRY statement without resources, but with an (optional) FINALLY clause.private booleanUnitCompiler.compileTryCatchFinallyWithResources(Java.TryStatement ts, List<Java.TryStatement.Resource> resources, UnitCompiler.Compilable2 compileBody, Java.Block finallY) Generates code for a TRY statement with (possibly zero) resources and an (optional) FINALLY clause.private booleanUnitCompiler.compileUnconditionalLoop(Java.ContinuableStatement cs, Java.BlockStatement body, Java.Rvalue[] update) private booleanUnitCompiler.compileUnconditionalLoopWithUpdate(Java.ContinuableStatement cs, Java.BlockStatement body, Java.Rvalue[] update) voidUnitCompiler.compileUnit(boolean debugSource, boolean debugLines, boolean debugVars, Collection<ClassFile> generatedClassFiles) Generates a set ofClassFileobjects which represent the classes and interfaces declared in the compilation unit.voidUnitCompiler.compileUnit(boolean debugSource, boolean debugLines, boolean debugVars, UnitCompiler.ClassFileConsumer storesClassFiles) Generates a set ofClassFileobjects which represent the classes and interfaces declared in the compilation unit.private IClassUnitCompiler.consT(Java.Locatable locatable, Object value) Pushes one value on the operand stack and pushes the respectiveClassFile.StackMapTableAttribute.VerificationTypeInfooperand to the stack map.private ObjectUnitCompiler.constantAssignmentConversion(Java.Locatable locatable, Object value, IType targetType) Implements "assignment conversion" (JLS7 5.2) on a constant value.private Java.Modifier[]Parser.constantModifiers(Java.Modifier[] modifiers) private Java.Modifier[]Parser.constructorModifiers(Java.Modifier[] modifiers) private IClassUnitCompiler.convertToPrimitiveNumericType(Java.Locatable locatable, IType type) If the given type is a primitive type, return that type.final void(package private) voidClassBodyEvaluator.cook(Java.CompilationUnit compilationUnit) voidvoidvoidfinal voidfinal voidfinal voidLikeExpressionEvaluator.cook(Scanner), but cooks a set of scripts into one class.final voidOn a 2 GHz Intel Pentium Core Duo under Windows XP with an IBM 1.4.2 JDK, compiling 10000 expressions "a + b" (integer) takes about 4 seconds and 56 MB of main memory.void(package private) voidScriptEvaluator.cook(String fileName, Java.AbstractCompilationUnit.ImportDeclaration[] importDeclarations, Java.BlockStatement[][] statementss, Java.MethodDeclarator[][] localMethodss) protected voidScriptEvaluator.cook(Java.CompilationUnit compilationUnit) Compiles the given compilationUnit, defines it into aClassLoader, loads the generated class, gets the script methods from that class, and makes them available throughScriptEvaluator.getMethod(int).final voidScriptEvaluator.cook(Java.CompilationUnit compilationUnit, Collection<Java.MethodDeclarator> methodDeclarators) final voidfinal voidCooks a set of scripts into one class.final voidScans, parses and compiles a given compilation unit from the givenReader.voidSimpleCompiler.cook(Java.AbstractCompilationUnit abstractCompilationUnit) Cooks this compilation unit directly.voidScans, parses and compiles a given compilation unit from the given scanner.private voidprivate voidprivate voidprivate voidstatic ObjectClassBodyEvaluator.createFastClassBodyEvaluator(Scanner scanner, Class<?> baseType, ClassLoader parentClassLoader) Deprecated.static ObjectClassBodyEvaluator.createFastClassBodyEvaluator(Scanner scanner, String className, Class<?> extendedClass, Class<?>[] implementedInterfaces, ClassLoader parentClassLoader) Deprecated.UseClassBodyEvaluator.createInstance(Reader)instead<T> TExpressionEvaluator.createFastEvaluator(Reader reader, Class<? extends T> interfaceToImplement, String... parameterNames) <T> TExpressionEvaluator.createFastEvaluator(String script, Class<? extends T> interfaceToImplement, String... parameterNames) <T> TExpressionEvaluator.createFastEvaluator(Scanner scanner, Class<T> interfaceToImplement, String... parameterNames) Notice: This method is not declared inIScriptEvaluator, and is hence only available in this implementation oforg.codehaus.commons.compiler.<T> TScriptEvaluator.createFastEvaluator(Reader reader, Class<T> interfaceToImplement, String[] parameterNames) <T> TScriptEvaluator.createFastEvaluator(String script, Class<T> interfaceToImplement, String[] parameterNames) <T> TScriptEvaluator.createFastEvaluator(Scanner scanner, Class<?> interfaceToImplement, String[] parameterNames) Notice: This method is not declared inIScriptEvaluator, and is hence only available in this implementation oforg.codehaus.commons.compiler.static ObjectExpressionEvaluator.createFastExpressionEvaluator(String expression, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.static ObjectExpressionEvaluator.createFastExpressionEvaluator(Scanner scanner, String[] defaultImports, String className, Class<?> extendedType, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.static ObjectExpressionEvaluator.createFastExpressionEvaluator(Scanner scanner, String className, Class<?> extendedType, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.static ObjectScriptEvaluator.createFastScriptEvaluator(String script, Class<?> interfaceToImplement, String[] parameterNames) Deprecated.static ObjectScriptEvaluator.createFastScriptEvaluator(Scanner scanner, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.static ObjectScriptEvaluator.createFastScriptEvaluator(Scanner scanner, String[] defaultImports, String className, Class<?> extendedClass, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.static ObjectScriptEvaluator.createFastScriptEvaluator(Scanner scanner, String className, Class<?> extendedType, Class<?> interfaceToImplement, String[] parameterNames, ClassLoader parentClassLoader) Deprecated.ClassBodyEvaluator.createInstance(Reader reader) voidJava.AbstractClassDeclaration.defineSyntheticField(IClass.IField iField) voidJava.InnerClassDeclaration.defineSyntheticField(IClass.IField iField) Inner classes have zero or more synthetic fields that hold references to their enclosing context:this$<em>n</em>(Mandatory for non-private non-static member classes; optional for private non-static member classes, local classes in non-static context, and anonymous classes in non-static context; forbidden for static member classes, local classes in static context, and anonymous classes in static context) Holds a reference to the immediately enclosing instance.private Java.RvalueUnitCompiler.determineValue(Java.FieldAccessExpression fae) private Java.RvalueUnitCompiler.determineValue(Java.SuperclassFieldAccessExpression scfae) "super.fld", "Type.super.fld"private Java.Modifier[]Parser.enumConstantModifiers(Java.Modifier[] modifiers) private booleanUnitCompiler.fakeCompile(Java.BlockStatement bs) Called to check whether the givenJava.BlockStatementcompiles or not.private voidUnitCompiler.fakeCompile(Java.Rvalue rv) Called to check whether the givenJava.Rvaluecompiles or not.private voidprivate IClass.IMethodUnitCompiler.fakeIMethod(IClass targetType, String name, Java.Rvalue[] arguments) private Java.Modifier[]Parser.fieldModifiers(Java.Modifier[] modifiers) private ITypeVariableOrIClassClassFileIClass.fieldTypeSignatureToITypeVariableOrIClass(SignatureParser.FieldTypeSignature fts) protected Java.AbstractCompilationUnitJavaSourceIClassLoader.findCompilationUnit(String className) Finds the Java source file for the named class through the configured 'source resource finder' and parses it.final IClass.IConstructorIClass.findIConstructor(IClass[] parameterTypes) private IClass.IFieldUnitCompiler.findIField(IClass iClass, String name, Location location) Finds a named field in the givenIClass.final IClass.IMethodIClass.findIMethod(String methodName, IClass[] parameterTypes) private IClass.IMethodUnitCompiler.findIMethod(IType targetType, Java.Invocation invocation) Finds aIClass.IMethodin the given targetType, its superclasses or superinterfaces which is applicable with the given invocation.UnitCompiler.findIMethod(Java.MethodInvocation mi) Finds methods of the mi.targetnamed mi.methodName, examines the argument types and chooses the most specific method.UnitCompiler.findIMethod(Java.SuperclassMethodInvocation superclassMethodInvocation) (package private) IClass[]IClass.findMemberType(String name) If name isnull, finds allIClasses visible in the scope of the current class.private voidIClass.findMemberType(String name, Collection<IClass> result) private IClassUnitCompiler.findMemberType(IType iType, String name, Java.TypeArgument[] typeArguments, Location location) Finds a named type in the givenIClassorIParameterizedType.UnitCompiler.findMostSpecificIInvocable(Java.Locatable locatable, IClass.IInvocable[] iInvocables, IClass[] argumentTypes, boolean boxingPermitted, Java.Scope contextScope) Determines the applicable invocables and choose the most specific invocable.private IClass.IInvocableUnitCompiler.findMostSpecificIInvocable(Java.Locatable locatable, IClass.IInvocable[] iInvocables, Java.Rvalue[] arguments, Java.Scope contextScope) Determines the arguments' types, determine the applicable invocables and choose the most specific invocable and adjust arguments as needed (for varargs case).private IClassUnitCompiler.findTypeByFullyQualifiedName(Location location, String[] identifiers) Attempts to load anIClassby fully-qualified name throughUnitCompiler.iClassLoader.private IClassUnitCompiler.findTypeByName(Location location, String className) Finds the namedIClassin this compilation unit, or through theUnitCompiler.iClassLoader.private voidUnitCompiler.generateBridgeMethod(ClassFile cf, IClass declaringIClass, IClass.IMethod base, IClass.IMethod override) Generates and compiles a bridge method with signature base that delegates to override.private booleanUnitCompiler.generatesCode(Java.BlockStatement bs) Checks whether invocation ofUnitCompiler.compile(BlockStatement)would generate more than zero code bytes.private booleanUnitCompiler.generatesCode2(List<Java.BlockStatement> l) private booleanUnitCompiler.generatesCode2(Java.Block b) private booleanUnitCompiler.generatesCode2(Java.FieldDeclaration fd) private booleanUnitCompiler.generatesCode2(Java.Initializer i) IClass.IAnnotation.getAnnotationType()private ITypeVariableOrIClass[]ClassFileIClass.getBounds(SignatureParser.FormalTypeParameter ftp) ITypeVariable.getBounds()abstract ObjectIClass.IField.getConstantValue()Returns the value of the field if it is a compile-time constant value, i.e.ReflectionIClass.ReflectionIField.getConstantValue()This implementation ofIClass.IField.getConstantValue()is not completely correct: It treats non-static fields as non-constant Even fields with a non-constant initializer are identified as constant.final ObjectUnitCompiler.getConstantValue(Java.ArrayInitializerOrRvalue rv) Attempts to evaluate as a constant expression.final ObjectUnitCompiler.getConstantValue(Java.Rvalue rv) Attempts to evaluate as a constant expression.private ObjectUnitCompiler.getConstantValue2(Java.AmbiguousName an) private ObjectUnitCompiler.getConstantValue2(Java.BinaryOperation bo) private ObjectUnitCompiler.getConstantValue2(Java.Cast c) private charUnitCompiler.getConstantValue2(Java.CharacterLiteral cl) private ObjectUnitCompiler.getConstantValue2(Java.ConditionalExpression ce) private ObjectUnitCompiler.getConstantValue2(Java.FieldAccess fa) private ObjectUnitCompiler.getConstantValue2(Java.FloatingPointLiteral fpl) private ObjectUnitCompiler.getConstantValue2(Java.IntegerLiteral il) private ObjectUnitCompiler.getConstantValue2(Java.LocalVariableAccess lva) private ObjectUnitCompiler.getConstantValue2(Java.ParenthesizedExpression pe) private StringUnitCompiler.getConstantValue2(Java.StringLiteral sl) private StringUnitCompiler.getConstantValue2(Java.TextBlock tb) private ObjectUnitCompiler.getConstantValue2(Java.UnaryOperation uo) final IClass[]IClass.getDeclaredIClasses()Returns the classes and interfaces declared as members of the class (but not inherited classes and interfaces).protected IClass[]ClassFileIClass.getDeclaredIClasses2()protected abstract IClass[]IClass.getDeclaredIClasses2()private Java.AbstractClassDeclarationUnitCompiler.getDeclaringClass(Java.QualifiedThisReference qtr) final IClassIClass.getDeclaringIClass()protected IClassClassFileIClass.getDeclaringIClass2()protected abstract IClassIClass.getDeclaringIClass2()private Java.TypeBodyDeclarationUnitCompiler.getDeclaringTypeBodyDeclaration(Java.QualifiedThisReference qtr) IClass.IField.getDescriptor()final MethodDescriptorIClass.IInvocable.getDescriptor()Returns the method descriptor of this constructor or method.IClass.IConstructor.getDescriptor2()abstract MethodDescriptorIClass.IInvocable.getDescriptor2()Uncached implementation ofIClass.IInvocable.getDescriptor().IClass.IMethod.getDescriptor2()IClass.IAnnotation.getElementValue(String name) private voidUnitCompiler.getfield(Java.Locatable locatable, IClass.IField iField) final IClass.IAnnotation[]IClass.getIAnnotations()protected IClass.IAnnotation[]ClassFileIClass.getIAnnotations2()protected IClass.IAnnotation[]IClass.getIAnnotations2()ReflectionIClass.getIAnnotations2()private IClassUnitCompiler.getIClass(Java.ThisReference tr) final IClass.IMethod[]IClass.getIMethods()Returns all methods declared in the class or interface, its superclasses and its superinterfaces.private voidIClass.getIMethods(List<IClass.IMethod> result) voidUnitCompiler.getIMethods(IClass type, String methodName, List<IClass.IMethod> v) Adds all methods with the given methodName that are declared by the type, its superclasses and all their superinterfaces to the result list v.final IClass[]IClass.getInterfaces()Returns the interfaces implemented by the class, respectively the superinterfaces of the interface, respectively{Cloneable,Serializable}for arrays.private static IType[]UnitCompiler.getInterfaces(IType t1) protected IClass[]ClassFileIClass.getInterfaces2()protected abstract IClass[]IClass.getInterfaces2()final ITypeVariable[]IClass.getITypeVariables()protected ITypeVariable[]ClassFileIClass.getITypeVariables2()protected abstract ITypeVariable[]IClass.getITypeVariables2()The uncached version ofIClass.getDeclaredIConstructors()which must be implemented by derived classes.UnitCompiler.getLocalVariable(Java.CatchParameter parameter) UnitCompiler.getLocalVariable(Java.FunctionDeclarator.FormalParameter parameter) UnitCompiler.getLocalVariable(Java.FunctionDeclarator.FormalParameter parameter, boolean isVariableArityParameter) UnitCompiler.getLocalVariable(Java.LocalVariableDeclarationStatement lvds, Java.VariableDeclarator vd) (package private) Java.ArrayInitializerOrRvalueUnitCompiler.getNonConstantFinalInitializer(Java.FieldDeclaration fd, Java.VariableDeclarator vd) Determines the non-constant-final initializer of the givenJava.VariableDeclarator.final IClassIClass.getOuterIClass()The following types have an "outer class": Anonymous classes declared in a non-static method of a class Local classes declared in a non-static method of a class Non-static member classesprotected IClassClassFileIClass.getOuterIClass2()protected abstract IClassIClass.getOuterIClass2()protected IClassReflectionIClass.getOuterIClass2()final IClass[]IClass.IInvocable.getParameterTypes()Returns the types of the parameters of this constructor or method.abstract IClass[]IClass.IInvocable.getParameterTypes2()Opposed to theConstructor, there is no magic "this$0" parameter.IClass[]ReflectionIClass.ReflectionIConstructor.getParameterTypes2()private IClassUnitCompiler.getRawReferenceType(Location location, String simpleTypeName, Java.Scope scope) private IClassUnitCompiler.getRawType(Java.Type t) private ITypeUnitCompiler.getReferenceType(Location location, String simpleTypeName, Java.TypeArgument[] typeArguments, Java.Scope scope) JLS7 6.5.5.1 Simple type name (single identifier)private ITypeUnitCompiler.getReferenceType(Location location, Java.Scope scope, String[] identifiers, int n, Java.TypeArgument[] typeArguments) abstract IClassIClass.IMethod.getReturnType()private ITypeUnitCompiler.getReturnType(Java.FunctionDeclarator fd) String[]UnitCompiler.getSingleTypeImport(String name, Location location) Checks if the given simple name was imported through a single type import.final IClassIClass.getSuperclass()Returns the superclass of the class.private static ITypeUnitCompiler.getSuperclass(IType type) protected IClassClassFileIClass.getSuperclass2()protected abstract IClassIClass.getSuperclass2()private ITypeUnitCompiler.getTargetIType(Java.QualifiedThisReference qtr) final IClass[]IClass.IInvocable.getThrownExceptions()Returns the types thrown by this constructor or method.abstract IClass[]IClass.IInvocable.getThrownExceptions2()abstract IClassIClass.IField.getType()private ITypeprivate ITypeUnitCompiler.getType(Java.Lvalue lv) private ITypeUnitCompiler.getType(Java.Rvalue rv) private ITypeprivate ITypeUnitCompiler.getType2(Java.AmbiguousName an) private ITypeUnitCompiler.getType2(Java.ArrayAccessExpression aae) private IClassUnitCompiler.getType2(Java.ArrayCreationReference acr) private IClassUnitCompiler.getType2(Java.ArrayType at) private ITypeUnitCompiler.getType2(Java.Assignment a) private ITypeUnitCompiler.getType2(Java.BinaryOperation bo) private ITypeprivate IClassUnitCompiler.getType2(Java.ClassInstanceCreationReference cicr) private ITypeUnitCompiler.getType2(Java.ConditionalExpression ce) private IClassUnitCompiler.getType2(Java.ConstructorInvocation ci) private ITypeUnitCompiler.getType2(Java.Crement c) private ITypeUnitCompiler.getType2(Java.FieldAccess fa) private ITypeUnitCompiler.getType2(Java.FieldAccessExpression fae) private IClassUnitCompiler.getType2(Java.LambdaExpression le) private IClassUnitCompiler.getType2(Java.MethodInvocation mi) private IClassUnitCompiler.getType2(Java.MethodReference mr) private IClassUnitCompiler.getType2(Java.NewArray na) private ITypeUnitCompiler.getType2(Java.NewClassInstance nci) private ITypeUnitCompiler.getType2(Java.NewInitializedArray nia) private IClassUnitCompiler.getType2(Java.Package p) private ITypeUnitCompiler.getType2(Java.ParameterAccess pa) private ITypeUnitCompiler.getType2(Java.ParenthesizedExpression pe) private ITypeUnitCompiler.getType2(Java.QualifiedThisReference qtr) private ITypeUnitCompiler.getType2(Java.ReferenceType rt) private IClassUnitCompiler.getType2(Java.RvalueMemberType rvmt) private ITypeUnitCompiler.getType2(Java.SuperclassFieldAccessExpression scfae) private IClassUnitCompiler.getType2(Java.SuperclassMethodInvocation scmi) private IClassUnitCompiler.getType2(Java.ThisReference tr) private IClassUnitCompiler.getType2(Java.UnaryOperation uo) private IType[]static String[]ExpressionEvaluator.guessParameterNames(Scanner scanner) Guess the names of the parameters used in the given expression.static String[]ScriptEvaluator.guessParameterNames(Scanner scanner) Guesses the names of the parameters used in the given expression.private static String[]ExpressionEvaluator.guessParameterNames2(Scanner scanner) private static String[]ScriptEvaluator.guessParameterNames2(Scanner scanner) voidFilterWarningHandler.handleWarning(String handle, String message, Location location) private booleanUnitCompiler.hasAnnotation(Java.FunctionDeclarator fd, IClass annotationType) final booleanIClass.hasIMethod(String methodName, IClass[] parameterTypes) booleanIClass.implementsInterface(IClass that) Ifthisrepresents a class: Returntrueif this class directly or indirectly implementsthatinterface.UnitCompiler.importSingleStatic(String simpleName) Imports a member class, member interface, static field or static method via the compilation unit's single static import declarations.private IClassUnitCompiler.importSingleType(String simpleTypeName, Location location) If the given name was declared in a simple type import, load that class.private voidUnitCompiler.importStatic(IClass declaringIClass, String simpleName, Collection<Object> result, Location location) Finds all members (member classes, member interfaces, static fields and/or static methods) of the declaringIClass with the given simpleName and adds them to the result.UnitCompiler.importStaticOnDemand(String simpleName) Imports a member class or interface, static field or static method via the compilation unit's static import on-demand declarations.UnitCompiler.importTypeOnDemand(String simpleTypeName, Location location) 6.5.2.BL1.B1.B5, 6.5.2.BL1.B1.B6 Type-import-on-demand.
6.5.5.1.6 Type-import-on-demand declaration.private IClassUnitCompiler.importTypeOnDemand2(String simpleTypeName, Location location) (package private) voidUnitCompiler.initializeInstanceVariablesAndInvokeInstanceInitializers(Java.ConstructorDeclarator cd) Compiles the instance variable initializers and the instance initializers in their lexical order.private Java.Modifier[]Parser.interfaceMethodModifiers(Java.Modifier[] modifiers) private Java.Modifier[]Parser.interfaceModifiers(Java.Modifier[] modifiers) private StringUnitCompiler.internalCheckAccessible(IClass iClassDeclaringMember, Access memberAccess, Java.Scope contextScope) private StringUnitCompiler.internalCheckAccessible(IClass type, Java.Scope contextScope) private intScanner.internalRead()private voidUnitCompiler.invokeConstructor(Java.Locatable locatable, IClass.IConstructor iConstructor) Invokes the iConstructor; assumes thatthisand the correct number and types of arguments are on the operand stack.private voidUnitCompiler.invokeConstructor(Java.Locatable locatable, Java.Scope scope, Java.Rvalue enclosingInstance, IType targetType, Java.Rvalue[] arguments) Expects the object to initialize on the stack.private voidUnitCompiler.invokeMethod(Java.Locatable locatable, IClass.IMethod iMethod) Invokes the iMethod; assumes thatthis(unless iMethod is static) and the correct number and types of arguments are on the operand stack.private booleanUnitCompiler.isAccessible(IClass.IMember member, Java.Scope contextScope) Determines whether the givenIClass.IMemberis accessible in the given context, according to JLS7 6.6.1.BL1.B4.private booleanUnitCompiler.isAccessible(IClass iClassDeclaringMember, Access memberAccess, Java.Scope contextScope) Determines whether a member (class, interface, field or method) declared in a given class is accessible from a given block statement context, according to JLS7 6.6.1.4.private booleanUnitCompiler.isAccessible(IClass type, Java.Scope contextScope) Determines whether the givenIClassis accessible in the given context, according to JLS7 6.6.1.2 and 6.6.1.4.booleanIClass.isAssignableFrom(IClass that) Determines ifthisis assignable from that.private static booleanUnitCompiler.isAssignableFrom(IType targetType, IType sourceType) private booleanUnitCompiler.isCastReferenceConvertible(IType sourceType, IType targetType) JLS7 5.5(package private) Java.LocalVariableUnitCompiler.isIntLv(Java.Crement c) Checks whether the operand is anintlocal variable.booleanIClass.IInvocable.isLessSpecificThan(IClass.IInvocable that) booleanIClass.IMethod.isLessSpecificThan(IClass.IInvocable that) private booleanUnitCompiler.isMethodInvocationConvertible(IClass sourceType, IClass targetType, boolean boxingPermitted) Checks if "method invocation conversion" (5.3) is possible.booleanIClass.IInvocable.isMoreSpecificThan(IClass.IInvocable that) booleanIClass.IMethod.isMoreSpecificThan(IClass.IInvocable that) private booleanUnitCompiler.isNarrowingReferenceConvertible(IType sourceType, IType targetType) Checks whether "narrowing reference conversion" (JLS7 5.1.5) is possible.booleanIClass.isSubclassOf(IClass that) Returnstrueif this class is an immediate or non-immediate subclass ofthatclass.private booleanprivate booleanUnitCompiler.isType2(Java.AmbiguousName an) private booleanUnitCompiler.isWideningReferenceConvertible(IType sourceType, IType targetType) Checks if "widening reference conversion" (5.1.4) is possible.private voidUnitCompiler.leave(Java.BlockStatement bs) Cleans up the statement context.private voidUnitCompiler.leave2(Java.TryStatement ts) private voidUnitCompiler.leaveStatements(Java.Scope from, Java.Scope to) Statements that jump out of blocks (return,break,continue) must call this method to make sure that thefinallyclauses of alltry ... catchandsynchronizedstatements are executed.(package private) final Java.AbstractCompilationUnit.ImportDeclaration[]ClassBodyEvaluator.makeImportDeclarations(Parser parser) protected voidScriptEvaluator.makeStatements(int idx, Parser parser, List<Java.BlockStatement> resultStatements, List<Java.MethodDeclarator> resultMethods) Parses statements from the parser until end-of-input.private voidUnitCompiler.maybeCreateInitMethod(Java.TypeDeclaration td, ClassFile cf, List<Java.BlockStatement> statements) Creates class/interface initialization method iff there is any initialization code.private Java.Modifier[]Parser.methodModifiers(Java.Modifier[] modifiers) private ClassFileUnitCompiler.newClassFile(short accessFlags, IClass iClass, IClass superclass, IClass[] interfaces) private booleanUnitCompiler.overridesMethod(IClass.IMethod method, IClass type) private booleanUnitCompiler.overridesMethodFromSupertype(IClass.IMethod m, IClass type) private Java.Modifier[]Parser.packageMemberClassModifiers(Java.Modifier[] modifiers) private Java.Modifier[]Parser.packageMemberInterfaceModifiers(Java.Modifier[] modifiers) private Java.Modifier[]Parser.packageModifiers(Java.Modifier[] modifiers) private Java.AbstractCompilationUnitCompiler.parseAbstractCompilationUnit(String fileName, InputStream inputStream, Charset charset) Reads one compilation unit from a file and parses it.Parser.parseAbstractCompilationUnit()CompilationUnit := [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration }Parser.parseAdditiveExpression()AdditiveExpression := MultiplicativeExpression { ( '+' | '-' ) MultiplicativeExpression }Parser.parseAndExpression()AndExpression := EqualityExpression { '&' EqualityExpression }private Java.AnnotationParser.parseAnnotation()Annotation := MarkerAnnotation // JLS7 9.7.2 | SingleElementAnnotation // JLS7 9.7.3 | NormalAnnotation // JLS7 9.7.1 MarkerAnnotation := '@' Identifier SingleElementAnnotation := '@' Identifier '(' ElementValue ')' NormalAnnotation := '@' TypeName '(' ElementValuePairsOpt ')' ElementValuePairsOpt := [ ElementValuePair { ',' ElementValuePair } ]Parser.parseAnnotationTypeDeclarationRest(String docComment, Java.Modifier[] modifiers, Parser.InterfaceDeclarationContext context) AnnotationTypeDeclarationRest := Identifier AnnotationTypeBodyParser.parseArgumentList()ArgumentList := Expression { ',' Expression }Parser.parseArguments()Arguments := '(' [ ArgumentList ] ')'Parser.parseArrayInitializer()ArrayInitializer := '{' [ VariableInitializer { ',' VariableInitializer } [ ',' ] '}'Parser.parseAssertStatement()AssertStatement := 'assert' Expression [ ':' Expression ] ';'Parser.parseAssignmentExpression()AssignmentExpression := ConditionalExpression [ AssignmentOperator AssignmentExpression ] AssignmentOperator := '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|='Parser.parseBlock()Block := '{' BlockStatements '}'Parser.parseBlockStatement()BlockStatement := Statement | (1) 'class' ...Parser.parseBlockStatements()BlockStatements := { BlockStatement }(package private) intParser.parseBracketsOpt()BracketsOpt := { '[' ']' }Parser.parseBreakStatement()BreakStatement := 'break' [ Identifier ] ';'Parser.parseCatchParameter()CatchFormalParameter := { VariableModifier } CatchType VariableDeclaratorId CatchType := UnannClassType { '|' ClassType } VariableModifier := Annotation | 'final' VariableDeclaratorId := Identifier [ Dims ] Dims := { Annotation } '[' ']' { { Annotation } '[' ']' } UnannClassType := Identifier [ TypeArguments ] | UnannClassOrInterfaceType '.' { Annotation } Identifier [ TypeArguments ] UnannInterfaceType := UnannClassType UnannClassOrInterfaceType := UnannClassType | UnannInterfaceType ClassType := { Annotation } Identifier [ TypeArguments ] | ClassOrInterfaceType '.' { Annotation } Identifier [ TypeArguments ]voidParser.parseClassBody(Java.AbstractClassDeclaration classDeclaration) ClassBody := '{' { ClassBodyDeclaration } '}'voidParser.parseClassBodyDeclaration(Java.AbstractClassDeclaration classDeclaration) ClassBodyDeclaration := ';' | ModifiersOpt ( Block | // Instance (JLS7 8.6) or static initializer (JLS7 8.7) 'void' Identifier MethodDeclarationRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | ConstructorDeclarator | [ TypeArguments ] Type Identifier MethodDeclarationRest | Type Identifier FieldDeclarationRest ';' )Parser.parseClassDeclarationRest(String docComment, Java.Modifier[] modifiers, Parser.ClassDeclarationContext context) ClassDeclarationRest := Identifier [ typeParameters ] [ 'extends' ReferenceType ] [ 'implements' ReferenceTypeList ] ClassBodyParser.parseConditionalAndExpression()ConditionalAndExpression := InclusiveOrExpression { '&&' InclusiveOrExpression }Parser.parseConditionalExpression()ConditionalExpression := ConditionalOrExpression [ '?' Expression ':' ConditionalExpression ]Parser.parseConditionalOrExpression()ConditionalOrExpression := ConditionalAndExpression { '||' ConditionalAndExpression ]Parser.parseConstructorDeclarator(String docComment, Java.Modifier[] modifiers) ConstructorDeclarator := Identifier FormalParameters [ 'throws' ReferenceTypeList ] '{' [ 'this' Arguments ';' | 'super' Arguments ';' | Primary '.' 'super' Arguments ';' ] BlockStatements '}'Parser.parseContinueStatement()ContinueStatement := 'continue' [ Identifier ] ';'Parser.parseDimExpr()DimExpr := '[' Expression ']'Parser.parseDimExprs()DimExprs := DimExpr { DimExpr }Parser.parseDoStatement()DoStatement := 'do' Statement 'while' '(' Expression ')' ';'private Java.ElementValueParser.parseElementValue()ElementValue := ConditionalExpression | Annotation | ElementValueArrayInitializerprivate Java.ElementValueParser.parseElementValueArrayInitializer()ElementValueArrayInitializer := '{' { ElementValue | ',' } '}'private Java.ElementValuePairParser.parseElementValuePair()ElementValuePair := Identifier '=' ElementValueParser.parseEmptyStatement()EmptyStatement := ';'voidParser.parseEnumBody(Java.EnumDeclaration enumDeclaration) EnumBody := '{' [ EnumConstant { ',' EnumConstant } [ ',' ] [ ';' ] { ClassBodyDeclaration } '}'Parser.parseEnumConstant()EnumConstant := [ Annotations ] Identifier [ Arguments ] [ ClassBody ]Parser.parseEnumDeclarationRest(String docComment, Java.Modifier[] modifiers, Parser.ClassDeclarationContext context) EnumDeclarationRest := Identifier [ 'implements' ReferenceTypeList ] EnumBodyParser.parseEqualityExpression()EqualityExpression := RelationalExpression { ( '==' | '!=' ) RelationalExpression }Parser.parseExclusiveOrExpression()ExclusiveOrExpression := AndExpression { '^' AndExpression }Parser.parseExpression()Expression := AssignmentExpression | LambdaExpressionParser.parseExpressionList()ExpressionList := Expression { ',' Expression }Parser.parseExpressionOrType()Parser.parseExpressionStatement()ExpressionStatement := Expression ';'Parser.parseFieldDeclarationRest(String name) FieldDeclarationRest := VariableDeclaratorRest { ',' VariableDeclarator }Parser.parseFormalParameter(boolean[] hasEllipsis) FormalParameter := [ 'final' ] Type FormalParameterRestParser.parseFormalParameterList()FormalParameterList := FormalParameter { ',' FormalParameter }Parser.parseFormalParameterListRest(Java.Type firstParameterType) FormalParameterListRest := Identifier { ',' FormalParameter }Parser.parseFormalParameterRest(Java.Modifier[] modifiers, Java.Type type, boolean[] hasEllipsis) FormalParameterRest := [ '.' '.' '.' ] Identifier BracketsOptParser.parseFormalParameters()FormalParameters := '(' [ FormalParameterList ] ')'Parser.parseForStatement()ForStatement := 'for' '(' [ ForInit ] ';' [ Expression ] ';' [ ExpressionList ] ')' Statement | 'for' '(' FormalParameter ':' Expression ')' Statement ForInit := Modifiers Type VariableDeclarators | ModifiersOpt PrimitiveType VariableDeclarators | Expression VariableDeclarators (1) | Expression { ',' Expression }Parser.parseIfStatement()IfStatement := 'if' '(' Expression ')' Statement [ 'else' Statement ]Parser.parseImportDeclaration()ImportDeclaration := 'import' ImportDeclarationBody ';'Parser.parseImportDeclarationBody()ImportDeclarationBody := [ 'static' ] Identifier { '.' Identifier } [ '.' '*' ](package private) Java.AbstractCompilationUnit.ImportDeclaration[]ScriptEvaluator.parseImports(Parser parser) Parser.parseInclusiveOrExpression()InclusiveOrExpression := ExclusiveOrExpression { '|' ExclusiveOrExpression }voidParser.parseInterfaceBody(Java.InterfaceDeclaration interfaceDeclaration) InterfaceBody := '{' { ';' | ModifiersOpt ( 'void' Identifier MethodDeclarationRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | Type Identifier ( MethodDeclarationRest | FieldDeclarationRest ) ) } '}'Parser.parseInterfaceDeclarationRest(String docComment, Java.Modifier[] modifiers, Parser.InterfaceDeclarationContext context) InterfaceDeclarationRest := Identifier [ typeParameters ] [ 'extends' ReferenceTypeList ] InterfaceBodyParser.parseLabeledStatement()LabeledStatement := Identifier ':' Statementprivate Java.LambdaBodyParser.parseLambdaBody()LambdaBody :=private Java.LambdaExpressionParser.parseLambdaExpression()LambdaExpression := LambdaParameters '->' LambdaBodyprivate Java.LambdaParametersParser.parseLambdaParameters()LambdaParameters := Identifier | '(' [ FormalParameterList ] ')' | '(' InferredFormalParameterList ')'Parser.parseLiteral()Literal := IntegerLiteral | FloatingPointLiteral | BooleanLiteral | CharacterLiteral | StringLiteral | NullLiteralParser.parseMethodBody()MethodBody := BlockParser.parseMethodDeclaration()Equivalent withparseMethodDeclaration(false, MethodDeclarationContext.CLASS_DECLARATION).Parser.parseMethodDeclaration(boolean allowDefaultClause, Parser.MethodDeclarationContext context) MethodDeclaration := [ DocComment ] Modifiers [ TypeParameters ] VoidOrType Identifier MethodDeclarationRestParser.parseMethodDeclarationRest(String docComment, Java.Modifier[] modifiers, Java.TypeParameter[] typeParameters, Java.Type type, String name, boolean allowDefaultClause, Parser.MethodDeclarationContext context) MethodDeclarationRest := FormalParameters { '[' ']' } [ 'throws' ReferenceTypeList ] [ 'default' expression ] ( ';' | MethodBody )Parser.parseModifiers()Modifiers := { Modifier }Parser.parseModuleDeclarationRest(Java.Modifier[] modifiers) ModuleDeclarationRest := [ 'open' ] 'module' identifier { '.' identifier} '{' { ModuleDirective } '}'Parser.parseMultiplicativeExpression()MultiplicativeExpression := UnaryExpression { ( '*' | '/' | '%' ) UnaryExpression }Parser.parseOptionalModifier()Modifier := Annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' | 'default'Parser.parsePackageDeclaration()PackageDeclaration := 'package' QualifiedIdentifier ';'Parser.parsePackageDeclarationRest(String docComment, Java.Modifier[] modifiers) PackageDeclaration := { PackageModifier } 'package' identifier { '.' identifier} ';'Parser.parsePackageMemberTypeDeclaration()PackageMemberTypeDeclaration := ModifiersOpt PackageMemberTypeDeclarationRestParser.parsePackageMemberTypeDeclarationRest(String docComment, Java.Modifier[] modifiers) PackageMemberTypeDeclarationRest := 'class' ClassDeclarationRest | 'enum' EnumDeclarationRest | 'interface' InterfaceDeclarationRest '@' 'interface' AnnotationTypeDeclarationRestParser.parsePrimary()Primary := CastExpression | // CastExpression 15.16 '(' Expression ')' | // ParenthesizedExpression 15.8.5 Literal | // Literal 15.8.1 Name | // AmbiguousName Name Arguments | // MethodInvocation Name '[]' { '[]' } | // ArrayType 10.1 Name '[]' { '[]' } '.' 'class' | // ClassLiteral 15.8.2 'this' | // This 15.8.3 'this' Arguments | // Alternate constructor invocation 8.8.5.1 'super' Arguments | // Unqualified superclass constructor invocation 8.8.5.1 'super' '.' Identifier | // SuperclassFieldAccess 15.11.2 'super' '.' Identifier Arguments | // SuperclassMethodInvocation 15.12.4.9 NewClassInstance | NewAnonymousClassInstance | // ClassInstanceCreationExpression 15.9 NewArray | // ArrayCreationExpression 15.10 NewInitializedArray | // ArrayInitializer 10.6 PrimitiveType { '[]' } | // Type PrimitiveType { '[]' } '.' 'class' | // ClassLiteral 15.8.2 'void' '.' 'class' | // ClassLiteral 15.8.2 MethodReference // MethodReference JLS9 15.13 Name := Identifier { '.' Identifier } CastExpression := '(' PrimitiveType { '[]' } ')' UnaryExpression | '(' Expression ')' UnaryExpression NewClassInstance := 'new' ReferenceType Arguments NewAnonymousClassInstance := 'new' ReferenceType Arguments [ ClassBody ] NewArray := 'new' Type DimExprs { '[]' } NewInitializedArray := 'new' ArrayType ArrayInitializerString[]Parser.parseQualifiedIdentifier()QualifiedIdentifier := Identifier { '.' Identifier }Parser.parseReferenceType()ReferenceType := { Annotation } QualifiedIdentifier [ TypeArguments ]Parser.parseReferenceTypeList()ReferenceTypeList := ReferenceType { ',' ReferenceType }Parser.parseRelationalExpression()RelationalExpression := ShiftExpression { 'instanceof' ReferenceType | '<' ShiftExpression [ { ',' TypeArgument } '>' ] | '<' TypeArgument [ { ',' TypeArgument } '>' ] | ( '>' | '<=' | '>=' ) ShiftExpression }private Java.TryStatement.ResourceParser.parseResource()Resource := Modifiers Type VariableDeclarator | VariableAccessParser.parseReturnStatement()ReturnStatement := 'return' [ Expression ] ';'private static voidScriptEvaluator.parseScriptStatement(Parser parser, List<Java.BlockStatement> mainStatements, List<Java.MethodDeclarator> localMethods) ScriptStatement := Statement (1) | 'class' ...Parser.parseSelector(Java.Atom atom) Selector := '.' Identifier | // FieldAccess 15.11.1 '.' Identifier Arguments | // MethodInvocation '.' '<' TypeList '>' 'super' Arguments // Superconstructor invocation (?) '.' '<' TypeList '>' 'super' '.' .Parser.parseShiftExpression()ShiftExpression := AdditiveExpression { ( '<<' | '>>' | '>>>' ) AdditiveExpression }Parser.parseStatement()Statement := LabeledStatement | Block | IfStatement | ForStatement | WhileStatement | DoStatement | TryStatement | 'switch' ...Parser.parseSwitchStatement()SwitchStatement := 'switch' '(' Expression ')' '{' { SwitchLabels BlockStatements } '}' SwitchLabels := SwitchLabels { SwitchLabels } SwitchLabel := 'case' Expression ':' | 'default' ':'Parser.parseSynchronizedStatement()SynchronizedStatement := 'synchronized' '(' expression ')' BlockParser.parseThrowStatement()ThrowStatement := 'throw' Expression ';'Parser.parseTryStatement()TryStatement := 'try' Block Catches [ Finally ] | 'try' Block Finally Catches := CatchClause { CatchClause } CatchClause := 'catch' '(' FormalParameter ')' Block Finally := 'finally' BlockParser.parseType()Type := ( 'byte' | 'short' | 'char' | 'int' | 'long' | 'float' | 'double' | 'boolean' | ReferenceType ) { '[' ']' }private Java.TypeArgumentParser.parseTypeArgument()TypeArgument := ReferenceType { '[' ']' } <= The optional brackets are missing in JLS7, section 18!? | PrimitiveType '[' ']' { '[' ']' } | '?' extends ReferenceType | '?' super ReferenceTypeprivate Java.TypeArgument[]Parser.parseTypeArgumentsOpt()TypeArguments := 'invalid input: '<'' [ TypeArgument { ',' TypeArgument } ] '>'private Java.TypeParameterParser.parseTypeParameter()TypeParameter := identifier [ 'extends' ( identifier | ReferenceType { 'invalid input: '&'' ReferenceType }private Java.TypeParameter[]Parser.parseTypeParametersOpt()TypeParameters := 'invalid input: '<'' TypeParameter { ',' TypeParameter } '>'Parser.parseUnaryExpression()UnaryExpression := { PrefixOperator } Primary { Selector } { PostfixOperator } PrefixOperator := '++' | '--' | '+' | '-' | '~' | '!' PostfixOperator := '++' | '--'Parser.parseVariableDeclarator()VariableDeclarator := Identifier VariableDeclaratorRestParser.parseVariableDeclaratorRest(String name) VariableDeclaratorRest := { '[' ']' } [ '=' VariableInitializer ]Parser.parseVariableDeclarators()VariableDeclarators := VariableDeclarator { ',' VariableDeclarator }Parser.parseVariableInitializer()VariableInitializer := ArrayInitializer | ExpressionParser.parseVoidOrType()VoidOrType := 'void' | TypeParser.parseWhileStatement()WhileStatement := 'while' '(' Expression ')' StatementParser.peek()booleanintbooleanintprivate intScanner.peek()Returns the next character, but does not consume it.private booleanChecks whether the next character is one of the expectedCharacters.TokenStream.peek()booleanintChecks whether the value of the next token equals any of the suspected; does not consume the next token.booleanintChecks whether the type of the next token is any of the suspected; does not consume the next token.TokenStreamImpl.peek()booleanintbooleanintprivate intScanner.peekButOne()Returns the next-but-one character, but does not consume any characters.private booleanParser.peekLiteral()Parser.peekNextButOne()booleanParser.peekNextButOne(String suspected) booleanParser.peekNextButOne(TokenType suspected) TokenStream.peekNextButOne()booleanTokenStream.peekNextButOne(String suspected) TokenStreamImpl.peekNextButOne()booleanTokenStreamImpl.peekNextButOne(String suspected) booleanintprivate booleanScanner.peekRead(int expected) Consumes the next character iff it equals the expected character.private booleanConsumes the next character iff it is one of the expectedCharactersbooleanChecks whether the value of the next token equals the suspected; if so, consumes the token.intChecks whether the value of the next token is one of the suspected; if so, consumes the token.Checks whether the type of the next token is the suspected; if so, consumes the token.intChecks whether the type of the next token is one of the suspected; if so, consumes the token.booleanintintScanner.produce()Produces and returns the next token.private TokenTokenStreamImpl.produceToken()private voidUnitCompiler.putfield(Java.Locatable locatable, IClass.IField iField) Parser.read()voidintprivate charScanner.read()Consumes and returns the next character.TokenStream.read()voidVerifies that the value of the next token equals expected, and consumes the token.intVerifies that the value of the next token equals one of the expected, and consumes the token.Verifies that the type of the next token is the expected, and consumes the token.intVerifies that the type of the next token is one of the expected, and consumes the token.TokenStreamImpl.read()voidintintprivate Java.AtomUnitCompiler.reclassify(Java.AmbiguousName an) private Java.AtomUnitCompiler.reclassifyName(Location location, Java.Scope scope, String identifier) JLS7 6.5.2.1private Java.AtomUnitCompiler.reclassifyName(Location location, Java.Scope scope, String[] identifiers, int n) Reclassifies the ambiguous name consisting of the first n of the identifiers (JLS7 6.5.2.2).private voidUnitCompiler.referenceThis(Java.Locatable locatable, Java.AbstractTypeDeclaration declaringType, Java.TypeBodyDeclaration declaringTypeBodyDeclaration, IType targetIType) private IClass[]ClassFileIClass.resolveClasses(short[] ifs) private TokenTypeScanner.scan()private voidScanner.scanLiteralCharacter()Scans the next literal character into aStringBuilder.private TokenTypeScanner.scanNumericLiteral()private voidUnitCompiler.stringConversion(Java.Locatable locatable, IType sourceType) Converts object of type "sourceType" to type "String" (JLS7 15.18.1.1).voidJava.AbstractAnnotation.throwCompileException(String message) voidJava.AbstractTypeDeclaration.throwCompileException(String message) voidJava.Locatable.throwCompileException(String message) Throws aCompileExceptionwith the given message and this object's location.voidJava.Located.throwCompileException(String message) private IClass.IAnnotationClassFileIClass.toIAnnotation(ClassFile.Annotation annotation) private IClass.IAnnotationUnitCompiler.toIAnnotation(Java.Annotation annotation) private IClass.IAnnotation[]ClassFileIClass.toIAnnotations(ClassFile.Annotation[] annotations) private IClass.IAnnotation[]UnitCompiler.toIAnnotations(Java.Annotation[] annotations) final Java.LvalueJava.Atom.toLvalueOrCompileException()private Java.LvalueUnitCompiler.toLvalueOrCompileException(Java.Atom a) final Java.RvalueJava.Atom.toRvalueOrCompileException()private Java.RvalueUnitCompiler.toRvalueOrCompileException(Java.Atom a) final Java.TypeJava.Atom.toTypeOrCompileException()private Java.TypeUnitCompiler.toTypeOrCompileException(Java.Atom a) private booleanUnitCompiler.tryAssignmentConversion(Java.Locatable locatable, IType sourceType, IType targetType, Object constantValue) private booleanUnitCompiler.tryCastConversion(Java.Locatable locatable, IType sourceType, IType targetType, Object constantValue) private booleanUnitCompiler.tryNarrowingReferenceConversion(Java.Locatable locatable, IType sourceType, IType targetType) Implements "narrowing reference conversion" (5.1.5).private ITypeUnitCompiler.typeArgumentToIType(Java.TypeArgument ta) private IType[]ReflectionIClass.typesToITypes(Type[] types) private ITypeReflectionIClass.typeToIType(Type type) private IClassUnitCompiler.unaryNumericPromotion(Java.Locatable locatable, IType type) Implements "unary numeric promotion" (JLS7 5.6.1).private IClassUnitCompiler.unaryNumericPromotionType(Java.Locatable locatable, IType type) private static StringDecodes any escape sequences like\n, or\377, but not\uxxxx.private Java.Modifier[]Parser.variableModifiers(Java.Modifier[] modifiers) private voidParser.verifyIdentifierIsConventionalClassOrInterfaceName(String id, Location loc) Issues a warning if the given identifier does not comply with the class and interface type naming conventions (JLS7 6.8.2).private voidParser.verifyIdentifierIsConventionalFieldName(String id, Location loc) Issues a warning if the given identifier does not comply with the field naming conventions (JLS7 6.8.4) and constant naming conventions (JLS7 6.8.5).private voidParser.verifyIdentifierIsConventionalLocalVariableOrParameterName(String id, Location loc) Issues a warning if the given identifier does not comply with the local variable and parameter naming conventions (JLS7 6.8.6).private voidParser.verifyIdentifierIsConventionalMethodName(String id, Location loc) Issues a warning if the given identifier does not comply with the method naming conventions (JLS7 6.8.3).private voidParser.verifyStringIsConventionalPackageName(String s, Location loc) Issues a warning if the given string does not comply with the package naming conventions.private voidprivate voidIssues a warning with the given message and location and returns.private voidIssues a warning with the given message and location and returns.private voidIssues a warning with the given message an location an returns.Constructors in org.codehaus.janino that throw CompileExceptionModifierConstructorDescriptionClassBodyEvaluator(String classBody) Equivalent toClassBodyEvaluator(String fileName, InputStream is) Equivalent toClassBodyEvaluator(String fileName, Reader reader) Equivalent toClassBodyEvaluator(Scanner scanner, Class<?> extendedType, Class<?>[] implementedTypes, ClassLoader parentClassLoader) Equivalent toClassBodyEvaluator(Scanner scanner, ClassLoader parentClassLoader) Equivalent toClassBodyEvaluator(Scanner scanner, String className, Class<?> extendedType, Class<?>[] implementedTypes, ClassLoader parentClassLoader) Equivalent toExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes) Equivalent toExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, Class<?> extendedClass, Class<?>[] implementedTypes, ClassLoader parentClassLoader) Equivalent toExpressionEvaluator(String expression, Class<?> expressionType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toExpressionEvaluator(Scanner scanner, String className, Class<?> extendedType, Class<?>[] implementedTypes, boolean staticMethod, Class<?> expressionType, String methodName, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Creates an expression evaluator with the full configurability.ExpressionStatement(Java.Rvalue rvalue) ScriptEvaluator(String script) Equivalent toScriptEvaluator(String fileName, InputStream is, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(String fileName, Reader reader, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(String script, Class<?> returnType) Equivalent toScriptEvaluator(String script, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes) Equivalent toScriptEvaluator(String script, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions) Equivalent toScriptEvaluator(Scanner scanner, Class<?> extendedType, Class<?>[] implementedTypes, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(Scanner scanner, Class<?> returnType, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toScriptEvaluator(Scanner scanner, String className, Class<?> extendedType, Class<?>[] implementedTypes, boolean staticMethod, Class<?> returnType, String methodName, String[] parameterNames, Class<?>[] parameterTypes, Class<?>[] thrownExceptions, ClassLoader parentClassLoader) Equivalent toSimpleCompiler(String fileName) Equivalent toSimpleCompiler(String fileName, InputStream is) Equivalent toSimpleCompiler(String fileName, Reader in) Equivalent toSimpleCompiler(Scanner scanner, ClassLoader parentClassLoader) Equivalent to -
Uses of CompileException in org.codehaus.janino.samples
Methods in org.codehaus.janino.samples that throw CompileException -
Uses of CompileException in org.codehaus.janino.util
Fields in org.codehaus.janino.util with type parameters of type CompileExceptionModifier and TypeFieldDescriptionprivate final Visitor.AbstractCompilationUnitVisitor<Java.AbstractCompilationUnit, CompileException> DeepCopier.abstractCompilationUnitCopierprivate final Visitor.AnnotationVisitor<Java.Annotation, CompileException> DeepCopier.annotationCopierprivate final Visitor.ArrayInitializerOrRvalueVisitor<Java.ArrayInitializerOrRvalue, CompileException> DeepCopier.arrayInitializerOrRvalueCopierprivate final Visitor.AtomVisitor<Java.Atom, CompileException> DeepCopier.atomCopierprivate final Visitor.BlockStatementVisitor<Java.BlockStatement, CompileException> DeepCopier.blockStatementCopierDeepCopier.constructorInvocationCopierprivate final Visitor.ElementValueVisitor<Java.ElementValue, CompileException> DeepCopier.elementValueCopierprivate final Visitor.FieldDeclarationOrInitializerVisitor<Java.FieldDeclarationOrInitializer, CompileException> DeepCopier.fieldDeclarationOrInitializerCopierprivate final Visitor.FunctionDeclaratorVisitor<Java.FunctionDeclarator, CompileException> DeepCopier.functionDeclaratorCopierprivate final Visitor.ImportVisitor<Java.AbstractCompilationUnit.ImportDeclaration, CompileException> DeepCopier.importCopierprivate final Visitor.LvalueVisitor<Java.Lvalue, CompileException> DeepCopier.lvalueCopierprivate final Visitor.ModifierVisitor<Java.Modifier, CompileException> DeepCopier.modifierCopierDeepCopier.resourceCopierprivate final Visitor.RvalueVisitor<Java.Rvalue, CompileException> DeepCopier.rvalueCopierprivate final Visitor.TypeArgumentVisitor<Java.TypeArgument, CompileException> DeepCopier.typeArgumentCopierDeepCopier.typeBodyDeclarationCopierprivate final Visitor.TypeVisitor<Java.Type, CompileException> DeepCopier.typeCopierprivate final Visitor.TypeDeclarationVisitor<Java.TypeDeclaration, CompileException> DeepCopier.typeDeclarationCopierMethods in org.codehaus.janino.util that throw CompileExceptionModifier and TypeMethodDescriptionDeepCopier.copyAbstractCompilationUnit(Java.AbstractCompilationUnit subject) DeepCopier.copyAlternateConstructorInvocation(Java.AlternateConstructorInvocation subject) DeepCopier.copyAmbiguousName(Java.AmbiguousName subject) DeepCopier.copyAnnotation(Java.Annotation subject) DeepCopier.copyAnnotations(Java.Annotation[] subject) DeepCopier.copyAnonymousClassDeclaration(Java.AnonymousClassDeclaration subject) DeepCopier.copyArrayAccessExpression(Java.ArrayAccessExpression subject) DeepCopier.copyArrayCreationReference(Java.ArrayCreationReference subject) DeepCopier.copyArrayInitializer(Java.ArrayInitializer subject) DeepCopier.copyArrayInitializerOrRvalue(Java.ArrayInitializerOrRvalue subject) DeepCopier.copyArrayInitializerOrRvalues(Java.ArrayInitializerOrRvalue[] subject) DeepCopier.copyArrayLength(Java.ArrayLength subject) DeepCopier.copyArrayType(Java.ArrayType subject) DeepCopier.copyAssertStatement(Java.AssertStatement subject) DeepCopier.copyAssignment(Java.Assignment subject) DeepCopier.copyBinaryOperation(Java.BinaryOperation subject) DeepCopier.copyBlock(Java.Block b) DeepCopier.copyBlockStatement(Java.BlockStatement subject) DeepCopier.copyBlockStatements(Collection<? extends Java.BlockStatement> subject) DeepCopier.copyBooleanLiteral(Java.BooleanLiteral subject) DeepCopier.copyBreakStatement(Java.BreakStatement subject) DeepCopier.copyCatchClause(Java.CatchClause subject) DeepCopier.copyCatchClauses(Collection<? extends Java.CatchClause> subject) DeepCopier.copyCatchParameter(Java.CatchParameter subject) DeepCopier.copyCharacterLiteral(Java.CharacterLiteral subject) DeepCopier.copyClassInstanceCreationReference(Java.ClassInstanceCreationReference subject) DeepCopier.copyClassLiteral(Java.ClassLiteral subject) DeepCopier.copyCompilationUnit(Java.CompilationUnit subject) DeepCopier.copyConditionalExpression(Java.ConditionalExpression subject) DeepCopier.copyConstructorDeclarator(Java.ConstructorDeclarator subject) DeepCopier.copyConstructorInvocation(Java.ConstructorInvocation subject) DeepCopier.copyContinueStatement(Java.ContinueStatement subject) DeepCopier.copyCrement(Java.Crement subject) DeepCopier.copyDoStatement(Java.DoStatement subject) DeepCopier.copyElementValue(Java.ElementValue subject) DeepCopier.copyElementValueArrayInitializer(Java.ElementValueArrayInitializer subject) DeepCopier.copyElementValuePair(Java.ElementValuePair subject) DeepCopier.copyElementValuePairs(Java.ElementValuePair[] subject) DeepCopier.copyElementValues(Java.ElementValue[] subject) DeepCopier.copyEmptyStatement(Java.EmptyStatement subject) DeepCopier.copyEnumConstant(Java.EnumConstant subject) DeepCopier.copyExpressionStatement(Java.ExpressionStatement es) DeepCopier.copyFieldAccess(Java.FieldAccess subject) DeepCopier.copyFieldAccessExpression(Java.FieldAccessExpression subject) DeepCopier.copyFieldDeclaration(Java.FieldDeclaration subject) DeepCopier.copyFieldDeclarationOrInitializer(Java.FieldDeclarationOrInitializer subject) DeepCopier.copyFloatingPointLiteral(Java.FloatingPointLiteral subject) DeepCopier.copyForEachStatement(Java.ForEachStatement fes) DeepCopier.copyFormalParameter(Java.FunctionDeclarator.FormalParameter subject) DeepCopier.copyFormalParameters(Java.FunctionDeclarator.FormalParameter[] subject) DeepCopier.copyFormalParameters(Java.FunctionDeclarator.FormalParameters subject) DeepCopier.copyForStatement(Java.ForStatement fs) DeepCopier.copyFunctionDeclarator(Java.FunctionDeclarator subject) DeepCopier.copyIfStatement(Java.IfStatement is) DeepCopier.copyImportDeclaration(Java.AbstractCompilationUnit.ImportDeclaration subject) DeepCopier.copyImportDeclarations(Java.AbstractCompilationUnit.ImportDeclaration[] subject) DeepCopier.copyInitializer(Java.Initializer subject) DeepCopier.copyInstanceof(Java.Instanceof subject) DeepCopier.copyIntegerLiteral(Java.IntegerLiteral subject) DeepCopier.copyLabeledStatement(Java.LabeledStatement ls) DeepCopier.copyLocalClassDeclaration(Java.LocalClassDeclaration subject) DeepCopier.copyLocalClassDeclarationStatement(Java.LocalClassDeclarationStatement subject) DeepCopier.copyLocalVariableAccess(Java.LocalVariableAccess subject) DeepCopier.copyLocalVariableDeclarationStatement(Java.LocalVariableDeclarationStatement subject) DeepCopier.copyLocalVariableDeclaratorResource(Java.TryStatement.LocalVariableDeclaratorResource subject) DeepCopier.copyLvalue(Java.Lvalue subject) DeepCopier.copyMarkerAnnotation(Java.MarkerAnnotation subject) DeepCopier.copyMemberAnnotationTypeDeclaration(Java.MemberAnnotationTypeDeclaration subject) DeepCopier.copyMemberClassDeclaration(Java.MemberClassDeclaration subject) DeepCopier.copyMemberEnumDeclaration(Java.MemberEnumDeclaration subject) DeepCopier.copyMemberInterfaceDeclaration(Java.MemberInterfaceDeclaration subject) DeepCopier.copyMemberTypeDeclaration(Java.MemberTypeDeclaration subject) DeepCopier.copyMethodDeclarator(Java.MethodDeclarator subject) DeepCopier.copyMethodInvocation(Java.MethodInvocation subject) DeepCopier.copyMethodReference(Java.MethodReference subject) DeepCopier.copyModifier(Java.Modifier modifier) DeepCopier.copyModifiers(Java.Modifier[] subject) DeepCopier.copyModularCompilationUnit(Java.ModularCompilationUnit subject) DeepCopier.copyNewAnonymousClassInstance(Java.NewAnonymousClassInstance subject) DeepCopier.copyNewArray(Java.NewArray subject) DeepCopier.copyNewClassInstance(Java.NewClassInstance subject) DeepCopier.copyNewInitializedArray(Java.NewInitializedArray subject) DeepCopier.copyNormalAnnotation(Java.NormalAnnotation subject) DeepCopier.copyNullLiteral(Java.NullLiteral subject) DeepCopier.copyOptionalArrayInitializer(Java.ArrayInitializer subject) DeepCopier.copyOptionalArrayInitializerOrRvalue(Java.ArrayInitializerOrRvalue subject) DeepCopier.copyOptionalArrayType(Java.ArrayType subject) DeepCopier.copyOptionalAtom(Java.Atom subject) DeepCopier.copyOptionalBlock(Java.Block subject) DeepCopier.copyOptionalBlockStatement(Java.BlockStatement subject) DeepCopier.copyOptionalConstructorInvocation(Java.ConstructorInvocation subject) DeepCopier.copyOptionalElementValue(Java.ElementValue subject) DeepCopier.copyOptionalPackageDeclaration(Java.PackageDeclaration subject) DeepCopier.copyOptionalReferenceType(Java.ReferenceType subject) DeepCopier.copyOptionalReferenceTypes(Java.ReferenceType[] subject) DeepCopier.copyOptionalRvalue(Java.Rvalue subject) DeepCopier.copyOptionalRvalues(Java.Rvalue[] subject) DeepCopier.copyOptionalStatements(Collection<? extends Java.BlockStatement> subject) DeepCopier.copyOptionalType(Java.Type subject) DeepCopier.copyOptionalTypeArguments(Java.TypeArgument[] subject) DeepCopier.copyOptionalTypeParameters(Java.TypeParameter[] subject) DeepCopier.copyPackage(Java.Package subject) DeepCopier.copyPackageDeclaration(Java.PackageDeclaration subject) DeepCopier.copyPackageMemberAnnotationTypeDeclaration(Java.PackageMemberAnnotationTypeDeclaration subject) DeepCopier.copyPackageMemberClassDeclaration(Java.PackageMemberClassDeclaration subject) DeepCopier.copyPackageMemberEnumDeclaration(Java.PackageMemberEnumDeclaration subject) DeepCopier.copyPackageMemberInterfaceDeclaration(Java.PackageMemberInterfaceDeclaration subject) DeepCopier.copyPackageMemberTypeDeclaration(Java.PackageMemberTypeDeclaration subject) DeepCopier.copyParameterAccess(Java.ParameterAccess pa) DeepCopier.copyParenthesizedExpression(Java.ParenthesizedExpression subject) DeepCopier.copyPrimitiveType(Java.PrimitiveType bt) DeepCopier.copyQualifiedThisReference(Java.QualifiedThisReference subject) DeepCopier.copyReferenceType(Java.ReferenceType subject) DeepCopier.copyReferenceTypes(Java.ReferenceType[] subject) DeepCopier.copyResource(Java.TryStatement.Resource subject) DeepCopier.copyResources(Collection<? extends Java.TryStatement.Resource> subject) DeepCopier.copyReturnStatement(Java.ReturnStatement subject) DeepCopier.copyRvalue(Java.Rvalue subject) DeepCopier.copyRvalueMemberType(Java.RvalueMemberType subject) DeepCopier.copyRvalues(Collection<? extends Java.Rvalue> subject) DeepCopier.copyRvalues(Java.Rvalue[] subject) DeepCopier.copySimpleLiteral(Java.SimpleConstant subject) DeepCopier.copySimpleType(Java.SimpleType st) DeepCopier.copySingleElementAnnotation(Java.SingleElementAnnotation subject) DeepCopier.copySingleStaticImportDeclaration(Java.AbstractCompilationUnit.SingleStaticImportDeclaration stid) DeepCopier.copySingleTypeImportDeclaration(Java.AbstractCompilationUnit.SingleTypeImportDeclaration stid) DeepCopier.copyStatement(Java.Statement subject) DeepCopier.copyStatements(Collection<? extends Java.BlockStatement> subject) DeepCopier.copyStaticImportOnDemandDeclaration(Java.AbstractCompilationUnit.StaticImportOnDemandDeclaration siodd) DeepCopier.copyStringLiteral(Java.StringLiteral subject) DeepCopier.copySuperclassFieldAccessExpression(Java.SuperclassFieldAccessExpression subject) DeepCopier.copySuperclassMethodInvocation(Java.SuperclassMethodInvocation subject) DeepCopier.copySuperConstructorInvocation(Java.SuperConstructorInvocation subject) DeepCopier.copySwitchBlockStatementGroup(Java.SwitchStatement.SwitchBlockStatementGroup subject) DeepCopier.copySwitchBlockStatementGroups(Collection<? extends Java.SwitchStatement.SwitchBlockStatementGroup> subject) DeepCopier.copySwitchStatement(Java.SwitchStatement subject) DeepCopier.copySynchronizedStatement(Java.SynchronizedStatement subject) DeepCopier.copyTextBlock(Java.TextBlock subject) DeepCopier.copyThisReference(Java.ThisReference subject) DeepCopier.copyThrowStatement(Java.ThrowStatement subject) DeepCopier.copyTryStatement(Java.TryStatement ts) DeepCopier.copyTypeArgument(Java.TypeArgument subject) DeepCopier.copyTypeArguments(Java.TypeArgument[] subject) DeepCopier.copyTypeBodyDeclaration(Java.TypeBodyDeclaration subject) DeepCopier.copyTypeDeclaration(Java.TypeDeclaration subject) DeepCopier.copyTypeImportOnDemandDeclaration(Java.AbstractCompilationUnit.TypeImportOnDemandDeclaration tiodd) DeepCopier.copyTypeParameter(Java.TypeParameter subject) DeepCopier.copyTypeParameters(Java.TypeParameter[] subject) DeepCopier.copyUnaryOperation(Java.UnaryOperation subject) DeepCopier.copyVariableAccessResource(Java.TryStatement.VariableAccessResource subject) DeepCopier.copyVariableDeclarator(Java.VariableDeclarator subject) DeepCopier.copyVariableDeclarators(Java.VariableDeclarator[] subject) DeepCopier.copyWhileStatement(Java.WhileStatement ws) DeepCopier.copyWildcard(Java.Wildcard subject)
ClassBodyEvaluator.createInstance(Reader)instead