|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use CompileException | |
---|---|
org.codehaus.commons.compiler | This package declares interfaces for the implementation of an IExpressionEvaluator , an IScriptEvaluator , an
IClassBodyEvaluator and an ISimpleCompiler . |
org.codehaus.commons.compiler.jdk | |
org.codehaus.janino | The classes in this package pose the core of the Janino JavaTM compiler. |
org.codehaus.janino.samples | Sample applications for the Janino JavaTM compiler. |
org.codehaus.janino.tools | Auxiliary command line tools related to JANINO. |
Uses of CompileException in org.codehaus.commons.compiler |
---|
Methods in org.codehaus.commons.compiler that throw CompileException | |
---|---|
void |
ICookable.cook(java.io.InputStream is)
Reads, scans, parses and compiles Java tokens from the given InputStream , encoded
in the "platform default encoding". |
void |
Cookable.cook(java.io.InputStream is)
|
void |
ICookable.cook(java.io.InputStream is,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given InputStream with the
given encoding . |
void |
Cookable.cook(java.io.InputStream is,
java.lang.String optionalEncoding)
|
void |
ICookable.cook(java.io.Reader r)
Reads, scans, parses and compiles Java tokens from the given Reader . |
void |
Cookable.cook(java.io.Reader r)
|
void |
IScriptEvaluator.cook(java.io.Reader[] readers)
Same as ICookable.cook(Reader) , but for multiple scripts. |
void |
ICookable.cook(java.lang.String s)
Reads, scans, parses and compiles Java tokens from the given String . |
void |
Cookable.cook(java.lang.String s)
|
void |
IScriptEvaluator.cook(java.lang.String[] strings)
Same as ICookable.cook(String) , but for multiple scripts. |
void |
IScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.io.Reader[] readers)
Same as ICookable.cook(String, Reader) , but cooks a set of scripts into one class. |
void |
IScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.lang.String[] strings)
Same as ICookable.cook(String, String) , but for multiple scripts. |
void |
ICookable.cook(java.lang.String optionalFileName,
java.io.InputStream is)
Reads, scans, parses and compiles Java tokens from the given InputStream , encoded
in the "platform default encoding". |
void |
Cookable.cook(java.lang.String optionalFileName,
java.io.InputStream is)
|
void |
ICookable.cook(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given InputStream with the
given encoding . |
void |
Cookable.cook(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.String optionalEncoding)
|
void |
ICookable.cook(java.lang.String optionalFileName,
java.io.Reader r)
Reads, scans, parses and compiles Java tokens from the given Reader . |
abstract void |
Cookable.cook(java.lang.String optionalFileName,
java.io.Reader r)
|
void |
ICookable.cook(java.lang.String optionalFileName,
java.lang.String s)
Reads, scans, parses and compiles Java tokens from the given String . |
void |
Cookable.cook(java.lang.String optionalFileName,
java.lang.String s)
|
void |
ICookable.cookFile(java.io.File file)
Reads, scans, parses and compiles Java tokens from the given File , encoded
in the "platform default encoding". |
void |
Cookable.cookFile(java.io.File file)
|
void |
ICookable.cookFile(java.io.File file,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the given File with the
given encoding . |
void |
Cookable.cookFile(java.io.File file,
java.lang.String optionalEncoding)
|
void |
ICookable.cookFile(java.lang.String fileName)
Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding". |
void |
Cookable.cookFile(java.lang.String fileName)
|
void |
ICookable.cookFile(java.lang.String fileName,
java.lang.String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the named file with the given encoding . |
void |
Cookable.cookFile(java.lang.String fileName,
java.lang.String optionalEncoding)
|
java.lang.Object |
IExpressionEvaluator.createFastEvaluator(java.io.Reader reader,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
IScriptEvaluator.createFastEvaluator(java.io.Reader reader,
java.lang.Class interfaceToImplement,
java.lang.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. |
java.lang.Object |
IExpressionEvaluator.createFastEvaluator(java.lang.String expression,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
If the parameter and return types of the expression are known at compile time, then a "fast" expression evaluator can be instantiated through IExpressionEvaluator.createFastEvaluator(String, Class, String[]) . |
java.lang.Object |
IScriptEvaluator.createFastEvaluator(java.lang.String script,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
IClassBodyEvaluator.createInstance(java.io.Reader reader)
Scans, parses and compiles a class body from the tokens delivered by the the given Reader , then creates
and returns an instance of that class. |
Uses of CompileException in org.codehaus.commons.compiler.jdk |
---|
Methods in org.codehaus.commons.compiler.jdk that throw CompileException | |
---|---|
protected void |
SimpleCompiler.cook(javax.tools.JavaFileObject compilationUnit)
|
void |
ScriptEvaluator.cook(java.io.Reader[] readers)
|
void |
ScriptEvaluator.cook(java.lang.String[] strings)
|
void |
ScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.io.Reader[] readers)
|
void |
ExpressionEvaluator.cook(java.lang.String[] optionalFileNames,
java.io.Reader[] readers)
|
protected void |
ScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.io.Reader[] readers,
java.lang.String[] imports)
|
void |
ScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.lang.String[] strings)
|
void |
ScriptEvaluator.cook(java.lang.String optionalFileName,
java.io.Reader r)
|
void |
ClassBodyEvaluator.cook(java.lang.String optionalFileName,
java.io.Reader r)
|
void |
SimpleCompiler.cook(java.lang.String optionalFileName,
java.io.Reader r)
|
protected void |
ClassBodyEvaluator.cook(java.lang.String optionalFileName,
java.lang.String[] imports,
java.io.Reader r)
|
java.lang.Object |
ScriptEvaluator.createFastEvaluator(java.io.Reader r,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
ScriptEvaluator.createFastEvaluator(java.lang.String script,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
ClassBodyEvaluator.createInstance(java.io.Reader reader)
|
Constructors in org.codehaus.commons.compiler.jdk that throw CompileException | |
---|---|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class<?> expressionType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes)
Equivalent to |
|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class<?> expressionType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes,
java.lang.Class<?>[] thrownExceptions,
java.lang.Class<?> optionalExtendedType,
java.lang.Class<?>[] implementedTypes,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class<?> expressionType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes,
java.lang.Class<?>[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(java.lang.String script)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class<?> returnType)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class<?> returnType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class<?> returnType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes,
java.lang.Class<?>[] thrownExceptions)
Equivalent to |
|
ScriptEvaluator(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.Class<?> returnType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes,
java.lang.Class<?>[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(java.lang.String optionalFileName,
java.io.Reader reader,
java.lang.Class<?> returnType,
java.lang.String[] parameterNames,
java.lang.Class<?>[] parameterTypes,
java.lang.Class<?>[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
Uses of CompileException in org.codehaus.janino |
---|
Methods in org.codehaus.janino that throw CompileException | |
---|---|
protected Java.PackageMemberClassDeclaration |
ClassBodyEvaluator.addPackageMemberClassDeclaration(Location location,
Java.CompilationUnit compilationUnit)
To the given Java.CompilationUnit , add
A class declaration with the configured name, superclass and interfaces
A method declaration with the given return type, name, parameter names and values and thrown exceptions
|
protected void |
UnitCompiler.buildLocalVariableMap(Java.CatchClause cc,
java.util.Map localVars)
|
boolean |
Compiler.compile(java.io.File[] sourceFiles)
Reads a set of Java™ compilation units (a.k.a. |
boolean |
Compiler.compile(Resource[] sourceResources)
See Compiler.compile(File[]) . |
void |
UnitCompiler.compile2(Java.AnonymousClassDeclaration acd)
|
void |
UnitCompiler.compile2(Java.ClassDeclaration cd)
|
void |
UnitCompiler.compile2(org.codehaus.janino.Java.InnerClassDeclaration icd)
|
void |
UnitCompiler.compile2(Java.InterfaceDeclaration id)
|
void |
UnitCompiler.compile2(Java.LocalClassDeclaration lcd)
|
void |
UnitCompiler.compile2(Java.MemberClassDeclaration mcd)
|
void |
UnitCompiler.compile2(Java.PackageMemberTypeDeclaration pmtd)
|
protected java.lang.Class |
ClassBodyEvaluator.compileToClass(Java.CompilationUnit compilationUnit,
java.lang.String newClassName)
Compile the given compilation unit, load all generated classes, and return the class with the given name. |
protected java.lang.ClassLoader |
SimpleCompiler.compileToClassLoader(Java.CompilationUnit compilationUnit)
Compile the given compilation unit. |
protected void |
ScriptEvaluator.compileToMethods(Java.CompilationUnit compilationUnit,
java.lang.String[] methodNames,
java.lang.Class[][] parameterTypes)
|
ClassFile[] |
UnitCompiler.compileUnit(boolean debugSource,
boolean debugLines,
boolean debugVars)
Generates an array of ClassFile objects which represent the classes and
interfaces declared in the compilation unit. |
void |
SimpleCompiler.cook(Java.CompilationUnit compilationUnit)
Cook this compilation unit directly. |
void |
ScriptEvaluator.cook(java.io.Reader[] readers)
|
void |
ClassBodyEvaluator.cook(Scanner scanner)
|
void |
SimpleCompiler.cook(Scanner scanner)
|
void |
ScriptEvaluator.cook(Scanner scanner)
|
void |
ScriptEvaluator.cook(Scanner[] scanners)
Like ScriptEvaluator.cook(Scanner) , but cooks a set of scripts into one class. |
void |
ScriptEvaluator.cook(java.lang.String[] strings)
|
void |
ScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.io.Reader[] readers)
On 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 |
ScriptEvaluator.cook(java.lang.String[] optionalFileNames,
java.lang.String[] strings)
|
void |
SimpleCompiler.cook(java.lang.String optionalFileName,
java.io.Reader r)
|
static java.lang.Object |
ClassBodyEvaluator.createFastClassBodyEvaluator(Scanner scanner,
java.lang.Class optionalBaseType,
java.lang.ClassLoader optionalParentClassLoader)
Use ClassBodyEvaluator.createInstance(Reader) instead: |
static java.lang.Object |
ClassBodyEvaluator.createFastClassBodyEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedClass,
java.lang.Class[] implementedInterfaces,
java.lang.ClassLoader optionalParentClassLoader)
Use ClassBodyEvaluator.createInstance(Reader) instead: |
java.lang.Object |
ScriptEvaluator.createFastEvaluator(java.io.Reader reader,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
ScriptEvaluator.createFastEvaluator(Scanner scanner,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
Notice: This method is not declared in IScriptEvaluator , and is hence only available in this
implementation of org.codehaus.commons.compiler . |
java.lang.Object |
ScriptEvaluator.createFastEvaluator(java.lang.String script,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
static java.lang.Object |
ExpressionEvaluator.createFastExpressionEvaluator(Scanner scanner,
java.lang.String[] optionalDefaultImports,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ExpressionEvaluator.createFastExpressionEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ExpressionEvaluator.createFastExpressionEvaluator(java.lang.String expression,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ScriptEvaluator.createFastScriptEvaluator(Scanner scanner,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ScriptEvaluator.createFastScriptEvaluator(Scanner scanner,
java.lang.String[] optionalDefaultImports,
java.lang.String className,
java.lang.Class optionalExtendedClass,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ScriptEvaluator.createFastScriptEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames,
java.lang.ClassLoader optionalParentClassLoader)
Deprecated. |
static java.lang.Object |
ScriptEvaluator.createFastScriptEvaluator(java.lang.String script,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
Deprecated. |
java.lang.Object |
ClassBodyEvaluator.createInstance(java.io.Reader reader)
|
void |
Java.ClassDeclaration.defineSyntheticField(IClass.IField iField)
|
void |
Parser.eatToken()
|
IClass.IMethod |
UnitCompiler.findIMethod(Java.MethodInvocation mi)
Find named methods of "targetType", examine the argument types and choose the most specific method. |
IClass.IMethod |
UnitCompiler.findIMethod(Java.SuperclassMethodInvocation scmi)
|
IClass.IMethod |
IClass.findIMethod(java.lang.String methodName,
IClass[] parameterTypes)
|
IClass.IInvocable |
UnitCompiler.findMostSpecificIInvocable(Java.Locatable l,
IClass.IInvocable[] iInvocables,
IClass[] argumentTypes,
boolean boxingPermitted,
Java.Scope contextScope)
Determine the applicable invocables and choose the most specific invocable. |
boolean |
UnitCompiler.generatesCode2(Java.Block b)
|
boolean |
UnitCompiler.generatesCode2(Java.FieldDeclaration fd)
|
boolean |
UnitCompiler.generatesCode2(Java.Initializer i)
|
boolean |
UnitCompiler.generatesCode2ListStatements(java.util.List l)
|
abstract java.lang.Object |
IClass.IField.getConstantValue()
Returns the value of the field if it is a compile-time constant value, i.e. |
java.lang.Object |
UnitCompiler.getConstantValue(Java.Rvalue rv)
Attempts to evaluate as a constant expression. |
IClass[] |
IClass.getDeclaredIClasses()
Returns the classes and interfaces declared as members of the class (but not inherited classes and interfaces). Returns an empty array for an array, primitive type or "void". |
protected abstract IClass[] |
IClass.getDeclaredIClasses2()
|
protected IClass[] |
ClassFileIClass.getDeclaredIClasses2()
|
IClass |
IClass.getDeclaringIClass()
If this class is a member class, return the declaring class, otherwise return null . |
protected abstract IClass |
IClass.getDeclaringIClass2()
|
protected IClass |
ClassFileIClass.getDeclaringIClass2()
|
abstract java.lang.String |
IClass.IInvocable.getDescriptor()
|
java.lang.String |
IClass.IConstructor.getDescriptor()
Opposed to IClass.IConstructor.getParameterTypes() , the method descriptor returned by this
method does include the optionally leading synthetic parameters. |
java.lang.String |
IClass.IMethod.getDescriptor()
|
java.lang.String |
IClass.IField.getDescriptor()
|
java.lang.String |
Scanner.Token.getIdentifier()
|
IClass.IMethod[] |
IClass.getIMethods()
Returns all methods declared in the class or interface, its superclasses and its superinterfaces. |
void |
UnitCompiler.getIMethods(IClass type,
java.lang.String methodName,
java.util.List v)
Add all methods with the given methodName that are declared
by the type , its superclasses and all their superinterfaces
to the result list v . |
IClass[] |
IClass.getInterfaces()
Returns the interfaces implemented by the class. Returns the superinterfaces of the interface. Returns "Cloneable" and "Serializable" for arrays. Returns an empty array for primitive types and "void". |
protected abstract IClass[] |
IClass.getInterfaces2()
|
protected IClass[] |
ClassFileIClass.getInterfaces2()
|
java.lang.String |
Scanner.Token.getKeyword()
|
java.lang.Object |
Scanner.Token.getLiteralValue()
|
Java.LocalVariable |
UnitCompiler.getLocalVariable(Java.FunctionDeclarator.FormalParameter fp)
|
Java.LocalVariable |
UnitCompiler.getLocalVariable(Java.LocalVariableDeclarationStatement lvds,
Java.VariableDeclarator vd)
|
java.lang.String |
Scanner.Token.getOperator()
|
IClass |
IClass.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 classes |
protected abstract IClass |
IClass.getOuterIClass2()
|
protected IClass |
ClassFileIClass.getOuterIClass2()
|
abstract IClass[] |
IClass.IInvocable.getParameterTypes()
|
abstract IClass[] |
IClass.IConstructor.getParameterTypes()
Opposed to Constructor.getParameterTypes() , the
return value of this method does not include the optionally leading "synthetic
parameters". |
abstract IClass |
IClass.IMethod.getReturnType()
|
IClass |
IClass.getSuperclass()
Returns the superclass of the class. Returns "null" for class "Object", interfaces, arrays, primitive types and "void". |
protected abstract IClass |
IClass.getSuperclass2()
|
protected IClass |
ClassFileIClass.getSuperclass2()
|
abstract IClass[] |
IClass.IInvocable.getThrownExceptions()
|
abstract IClass |
IClass.IField.getType()
|
static java.lang.String[] |
ScriptEvaluator.guessParameterNames(Scanner scanner)
Guess the names of the parameters used in the given expression. |
static java.lang.String[] |
ExpressionEvaluator.guessParameterNames(Scanner scanner)
Guess the names of the parameters used in the given expression. |
void |
UnitCompiler.ErrorHandler.handleError(java.lang.String message,
Location optionalLocation)
|
boolean |
IClass.hasIMethod(java.lang.String methodName,
IClass[] parameterTypes)
|
boolean |
IClass.implementsInterface(IClass that)
If this represents a class: Return true if this class
directly or indirectly implements that interface. |
IClass |
UnitCompiler.importTypeOnDemand(java.lang.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. |
boolean |
IClass.isAssignableFrom(IClass that)
Determine if "this" is assignable from "that". |
boolean |
IClass.IInvocable.isLessSpecificThan(IClass.IInvocable that)
|
boolean |
IClass.IInvocable.isMoreSpecificThan(IClass.IInvocable that)
|
boolean |
IClass.isSubclassOf(IClass that)
Returns true if this class is an immediate or non-immediate
subclass of that class. |
protected Java.CompilationUnit |
ClassBodyEvaluator.makeCompilationUnit(Scanner optionalScanner)
Create a Java.CompilationUnit , set the default imports, and parse the import declarations. |
protected java.util.List |
ScriptEvaluator.makeStatements(int idx,
Scanner scanner)
Fill the given block by parsing statements until EOF and adding
them to the block. |
protected java.util.List |
ExpressionEvaluator.makeStatements(int idx,
Scanner scanner)
|
Java.Atom |
Parser.parseAdditiveExpression()
AdditiveExpression := MultiplicativeExpression { ( '+' | '-' ) MultiplicativeExpression } |
Java.Atom |
Parser.parseAndExpression()
AndExpression := EqualityExpression { '&' EqualityExpression } |
Java.Rvalue[] |
Parser.parseArgumentList()
ArgumentList := Expression { ',' Expression } |
Java.Rvalue[] |
Parser.parseArguments()
Arguments := '(' [ ArgumentList ] ')' |
Java.ArrayInitializer |
Parser.parseArrayInitializer()
ArrayInitializer := '{' [ VariableInitializer { ',' VariableInitializer } [ ',' ] '}' |
Java.Atom |
Parser.parseAssignmentExpression()
AssignmentExpression := ConditionalExpression [ AssignmentOperator AssignmentExpression ] AssignmentOperator := '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' |
Java.Block |
Parser.parseBlock()
'{' BlockStatements '}' |
Java.BlockStatement |
Parser.parseBlockStatement()
BlockStatement := { Identifier ':' } ( ( Modifiers Type | ModifiersOpt BasicType ) LocalVariableDeclarators ';' | 'class' ... |
java.util.List |
Parser.parseBlockStatements()
BlockStatements := { BlockStatement } |
Java.Statement |
Parser.parseBreakStatement()
BreakStatement := 'break' [ Identifier ] ';' |
void |
Parser.parseClassBody(Java.ClassDeclaration classDeclaration)
ClassBody := '{' { ClassBodyDeclaration } '}' |
void |
Parser.parseClassBodyDeclaration(Java.ClassDeclaration classDeclaration)
ClassBodyDeclaration := ';' | ModifiersOpt ( Block | // Instance (JLS2 8.6) or static initializer (JLS2 8.7) 'void' Identifier MethodDeclarationRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | ConstructorDeclarator | Type Identifier ( MethodDeclarationRest | FieldDeclarationRest ';' ) ) |
Java.NamedClassDeclaration |
Parser.parseClassDeclarationRest(java.lang.String optionalDocComment,
short modifiers,
Parser.ClassDeclarationContext context)
ClassDeclarationRest := Identifier [ 'extends' ReferenceType ] [ 'implements' ReferenceTypeList ] ClassBody |
Java.CompilationUnit |
Parser.parseCompilationUnit()
CompilationUnit := [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration } |
Java.Atom |
Parser.parseConditionalAndExpression()
ConditionalAndExpression := InclusiveOrExpression { '&&' InclusiveOrExpression } |
Java.Atom |
Parser.parseConditionalExpression()
ConditionalExpression := ConditionalOrExpression [ '?' Expression ':' ConditionalExpression ] |
Java.Atom |
Parser.parseConditionalOrExpression()
ConditionalOrExpression := ConditionalAndExpression { '||' ConditionalAndExpression ] |
Java.ConstructorDeclarator |
Parser.parseConstructorDeclarator(java.lang.String optionalDocComment,
short modifiers)
ConstructorDeclarator := Identifier FormalParameters [ 'throws' ReferenceTypeList ] '{' [ 'this' Arguments ';' | 'super' Arguments ';' | Primary '.' 'super' Arguments ';' ] BlockStatements '}' |
Java.Statement |
Parser.parseContinueStatement()
ContinueStatement := 'continue' [ Identifier ] ';' |
Java.Rvalue |
Parser.parseDimExpr()
DimExpr := '[' Expression ']' |
Java.Rvalue[] |
Parser.parseDimExprs()
DimExprs := DimExpr { DimExpr } |
Java.Statement |
Parser.parseDoStatement()
DoStatement := 'do' Statement 'while' '(' Expression ')' ';' |
Java.Statement |
Parser.parseEmptyStatement()
EmptyStatement := ';' |
Java.Atom |
Parser.parseEqualityExpression()
EqualityExpression := RelationalExpression { ( '==' | '!=' ) RelationalExpression } |
Java.Atom |
Parser.parseExclusiveOrExpression()
ExclusiveOrExpression := AndExpression { '^' AndExpression } |
Java.Atom |
Parser.parseExpression()
Expression := AssignmentExpression |
Java.Rvalue[] |
Parser.parseExpressionList()
ExpressionList := Expression { ',' Expression } |
Java.Statement |
Parser.parseExpressionStatement()
ExpressionStatement := Expression ';' |
Java.VariableDeclarator[] |
Parser.parseFieldDeclarationRest(java.lang.String name)
FieldDeclarationRest := VariableDeclaratorRest { ',' VariableDeclarator } |
Java.FunctionDeclarator.FormalParameter |
Parser.parseFormalParameter()
FormalParameter := [ 'final' ] Type Identifier BracketsOpt |
Java.FunctionDeclarator.FormalParameter[] |
Parser.parseFormalParameters()
FormalParameters := '(' [ FormalParameter { ',' FormalParameter } ] ')' |
Java.Statement |
Parser.parseForStatement()
ForStatement := 'for' '(' [ ForInit ] ';' [ Expression ] ';' [ ExpressionList ] ')' Statement |
Java.Statement |
Parser.parseIfStatement()
IfStatement := 'if' '(' Expression ')' Statement [ 'else' Statement ] |
Java.CompilationUnit.ImportDeclaration |
Parser.parseImportDeclaration()
ImportDeclaration := 'import' ImportDeclarationBody ';' |
Java.CompilationUnit.ImportDeclaration |
Parser.parseImportDeclarationBody()
ImportDeclarationBody := [ 'static' ] Identifier { '.' Identifier } [ '.' '*' ] |
Java.Atom |
Parser.parseInclusiveOrExpression()
InclusiveOrExpression := ExclusiveOrExpression { '|' ExclusiveOrExpression } |
void |
Parser.parseInterfaceBody(Java.InterfaceDeclaration interfaceDeclaration)
InterfaceBody := '{' { ';' | ModifiersOpt ( 'void' Identifier MethodDeclarationRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | Type Identifier ( MethodDeclarationRest | FieldDeclarationRest ) ) } '}' |
Java.InterfaceDeclaration |
Parser.parseInterfaceDeclarationRest(java.lang.String optionalDocComment,
short modifiers,
Parser.InterfaceDeclarationContext context)
InterfaceDeclarationRest := Identifier [ 'extends' ReferenceTypeList ] InterfaceBody |
Java.Statement |
Parser.parseLabeledStatement()
LabeledStatement := Identifier ':' Statement |
Java.Atom |
Parser.parseLiteral()
|
Java.VariableDeclarator[] |
Parser.parseLocalVariableDeclarators()
LocalVariableDeclarators := VariableDeclarator { ',' VariableDeclarator } |
Java.Block |
Parser.parseMethodBody()
MethodBody := Block |
Java.MethodDeclarator |
Parser.parseMethodDeclarationRest(java.lang.String optionalDocComment,
short modifiers,
Java.Type type,
java.lang.String name)
MethodDeclarationRest := FormalParameters { '[' ']' } [ 'throws' ReferenceTypeList ] ( ';' | MethodBody ) |
short |
Parser.parseModifiersOpt()
ModifiersOpt := { 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' |
Java.Atom |
Parser.parseMultiplicativeExpression()
MultiplicativeExpression := UnaryExpression { ( '*' | '/' | '%' ) UnaryExpression } |
Java.PackageDeclaration |
Parser.parsePackageDeclaration()
PackageDeclaration := 'package' QualifiedIdentifier ';' |
Java.PackageMemberTypeDeclaration |
Parser.parsePackageMemberTypeDeclaration()
PackageMemberTypeDeclaration := ModifiersOpt 'class' ClassDeclarationRest | ModifiersOpt 'interface' InterfaceDeclarationRest |
Java.Atom |
Parser.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 BasicType { '[]' } | // Type BasicType { '[]' } '.' 'class' | // ClassLiteral 15.8.2 'void' '.' 'class' // ClassLiteral 15.8.2 CastExpression := '(' PrimitiveType { '[]' } ')' UnaryExpression | '(' Expression ')' UnaryExpression NewClassInstance := 'new' ReferenceType Arguments NewAnonymousClassInstance := 'new' ReferenceType Arguments [ ClassBody ] NewArray := 'new' Type DimExprs { '[]' } NewInitializedArray := 'new' ArrayType ArrayInitializer |
java.lang.String[] |
Parser.parseQualifiedIdentifier()
QualifiedIdentifier := Identifier { '.' Identifier } |
Java.ReferenceType |
Parser.parseReferenceType()
ReferenceType := QualifiedIdentifier |
Java.ReferenceType[] |
Parser.parseReferenceTypeList()
ReferenceTypeList := ReferenceType { ',' ReferenceType } |
Java.Atom |
Parser.parseRelationalExpression()
RelationalExpression := ShiftExpression { ( ( '<' | '>' | '<=' | '>=' ) ShiftExpression ) | ( 'instanceof' ReferenceType ) } |
Java.Statement |
Parser.parseReturnStatement()
ReturnStatement := 'return' [ Expression ] ';' |
Java.Atom |
Parser.parseSelector(Java.Atom atom)
Selector := '.' Identifier | // FieldAccess 15.11.1 '.' Identifier Arguments | // MethodInvocation '.' 'this' // QualifiedThis 15.8.4 '.' 'super' Arguments // Qualified superclass constructor invocation (JLS 8.8.5.1) '.' 'super' '.' Identifier | // SuperclassFieldReference (JLS 15.11.2) '.' 'super' '.' Identifier Arguments | // SuperclassMethodInvocation (JLS 15.12.4.9) '.' 'new' Identifier Arguments [ ClassBody ] | // QualifiedClassInstanceCreationExpression 15.9 '.' 'class' '[' Expression ']' // ArrayAccessExpression 15.13 |
Java.Atom |
Parser.parseShiftExpression()
ShiftExpression := AdditiveExpression { ( '<<' | '>>' | '>>>' ) AdditiveExpression } |
Java.Statement |
Parser.parseStatement()
Statement := LabeledStatement | Block | IfStatement | ForStatement | WhileStatement | DoStatement | TryStatement | 'switch' ... |
Java.Statement |
Parser.parseSwitchStatement()
SwitchStatement := 'switch' '(' Expression ')' '{' { SwitchLabels BlockStatements } '}' SwitchLabels := SwitchLabels { SwitchLabels } SwitchLabel := 'case' Expression ':' | 'default' ':' |
Java.Statement |
Parser.parseSynchronizedStatement()
SynchronizedStatement := 'synchronized' '(' expression ')' Block |
Java.Statement |
Parser.parseThrowStatement()
ThrowStatement := 'throw' Expression ';' |
Java.Statement |
Parser.parseTryStatement()
TryStatement := 'try' Block Catches [ Finally ] | 'try' Block Finally Catches := CatchClause { CatchClause } CatchClause := 'catch' '(' FormalParameter ')' Block Finally := 'finally' Block |
Java.Type |
Parser.parseType()
Type := ( 'byte' | 'short' | 'char' | 'int' | 'long' | 'float' | 'double' | 'boolean' | ReferenceType ) { '[' ']' } |
Java.Atom |
Parser.parseUnaryExpression()
UnaryExpression := { PrefixOperator } Primary { Selector } { PostfixOperator } PrefixOperator := '++' | '--' | '+' | '-' | '~' | '!' PostfixOperator := '++' | '--' |
Java.VariableDeclarator |
Parser.parseVariableDeclarator()
VariableDeclarator := Identifier VariableDeclaratorRest |
Java.VariableDeclarator |
Parser.parseVariableDeclaratorRest(java.lang.String name)
VariableDeclaratorRest := { '[' ']' } [ '=' VariableInitializer ] |
Java.ArrayInitializerOrRvalue |
Parser.parseVariableInitializer()
VariableInitializer := ArrayInitializer | Expression |
Java.Statement |
Parser.parseWhileStatement()
WhileStatement := 'while' '(' Expression ')' Statement |
Scanner.Token |
Scanner.peekNextButOne()
Peek the next but one token, neither remove the next nor the next but one token from the input. |
Scanner.Token |
Scanner.read()
Read the next token from the input. |
java.lang.String |
Parser.readIdentifier()
|
void |
Parser.readKeyword(java.lang.String keyword)
|
java.lang.String |
Parser.readOperator()
|
void |
Parser.readOperator(java.lang.String operator)
|
void |
Java.Locatable.throwCompileException(java.lang.String message)
Throw a CompileException with the given message and this
object's location. |
void |
Java.Located.throwCompileException(java.lang.String message)
|
void |
Java.AbstractTypeDeclaration.throwCompileException(java.lang.String message)
|
protected void |
Parser.throwCompileException(java.lang.String message)
Convenience method for throwing a CompileException. |
Java.Lvalue |
UnitCompiler.toLvalueOrCE(Java.Atom a)
|
Java.Lvalue |
Java.Atom.toLvalueOrPE()
|
Java.Rvalue |
Java.Atom.toRvalueOrPE()
|
Java.Type |
Java.Atom.toTypeOrPE()
|
Constructors in org.codehaus.janino that throw CompileException | |
---|---|
ClassBodyEvaluator(Scanner scanner,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ClassBodyEvaluator(Scanner scanner,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ClassBodyEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ClassBodyEvaluator(java.lang.String classBody)
Equivalent to |
|
ClassBodyEvaluator(java.lang.String optionalFileName,
java.io.InputStream is)
Equivalent to |
|
ClassBodyEvaluator(java.lang.String optionalFileName,
java.io.Reader reader)
Equivalent to |
|
ExpressionEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
boolean staticMethod,
java.lang.Class expressionType,
java.lang.String methodName,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class expressionType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes)
Equivalent to |
|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class expressionType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ExpressionEvaluator(java.lang.String expression,
java.lang.Class expressionType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
Java.ExpressionStatement(Java.Rvalue rvalue)
|
|
Java.PackageMemberClassDeclaration(Location location,
java.lang.String optionalDocComment,
short modifiers,
java.lang.String name,
Java.Type optionalExtendedType,
Java.Type[] implementedTypes)
|
|
Java.PackageMemberInterfaceDeclaration(Location location,
java.lang.String optionalDocComment,
short modifiers,
java.lang.String name,
Java.Type[] extendedTypes)
|
|
Scanner(java.io.File file)
Deprecated. |
|
Scanner(java.io.File file,
java.lang.String optionalEncoding)
Deprecated. |
|
Scanner(java.lang.String fileName)
Deprecated. |
|
Scanner(java.lang.String optionalFileName,
java.io.InputStream is)
Set up a scanner that reads tokens from the given InputStream in the platform default encoding. |
|
Scanner(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.String optionalEncoding)
Set up a scanner that reads tokens from the given InputStream with the given optionalEncoding
(null means platform default encoding). |
|
Scanner(java.lang.String optionalFileName,
java.io.Reader in)
Set up a scanner that reads tokens from the given Reader . |
|
Scanner(java.lang.String optionalFileName,
java.io.Reader in,
short initialLineNumber,
short initialColumnNumber)
Creates a Scanner that counts lines and columns from non-default initial
values. |
|
Scanner(java.lang.String fileName,
java.lang.String encoding)
Deprecated. |
|
ScriptEvaluator(Scanner scanner,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(Scanner scanner,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(Scanner scanner,
java.lang.String className,
java.lang.Class optionalExtendedType,
java.lang.Class[] implementedTypes,
boolean staticMethod,
java.lang.Class returnType,
java.lang.String methodName,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(java.lang.String script)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class returnType)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes)
Equivalent to |
|
ScriptEvaluator(java.lang.String script,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions)
Equivalent to |
|
ScriptEvaluator(java.lang.String optionalFileName,
java.io.InputStream is,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
ScriptEvaluator(java.lang.String optionalFileName,
java.io.Reader reader,
java.lang.Class returnType,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class[] thrownExceptions,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
SimpleCompiler(Scanner scanner,
java.lang.ClassLoader optionalParentClassLoader)
Equivalent to |
|
SimpleCompiler(java.lang.String fileName)
Equivalent to |
|
SimpleCompiler(java.lang.String optionalFileName,
java.io.InputStream is)
Equivalent to |
|
SimpleCompiler(java.lang.String optionalFileName,
java.io.Reader in)
Equivalent to |
|
UnitCompiler(Java.CompilationUnit compilationUnit,
IClassLoader iClassLoader)
|
Uses of CompileException in org.codehaus.janino.samples |
---|
Methods in org.codehaus.janino.samples that throw CompileException | |
---|---|
static void |
DeclarationCounter.main(java.lang.String[] args)
|
Uses of CompileException in org.codehaus.janino.tools |
---|
Methods in org.codehaus.janino.tools that throw CompileException | |
---|---|
void |
JGrep.jGrep(java.io.File[] rootDirectories,
StringPattern[] directoryNamePatterns,
StringPattern[] fileNamePatterns,
java.util.List methodInvocationTargets)
|
void |
JGrep.jGrep(java.util.Iterator sourceFilesIterator,
java.util.List methodInvocationTargets)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |