Package | Description |
---|---|
org.codehaus.commons.compiler |
This package declares interfaces for the implementation of an
IExpressionEvaluator , an IScriptEvaluator , an
IClassBodyEvaluator and an ISimpleCompiler . |
org.codehaus.commons.compiler.jdk |
Main package of the plugin.
|
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.
|
Modifier and Type | Field and Description |
---|---|
CompileException |
UncheckedCompileException.compileException
The nested
CompileException . |
Modifier and Type | Method and Description |
---|---|
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
optionalEncoding . |
void |
Cookable.cookFile(java.lang.String fileName,
java.lang.String optionalEncoding) |
<T> java.lang.Object |
IScriptEvaluator.createFastEvaluator(java.io.Reader reader,
java.lang.Class<T> 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.
|
<T> java.lang.Object |
IExpressionEvaluator.createFastEvaluator(java.io.Reader reader,
java.lang.Class<T> interfaceToImplement,
java.lang.String[] parameterNames) |
<T> java.lang.Object |
IScriptEvaluator.createFastEvaluator(java.lang.String script,
java.lang.Class<T> interfaceToImplement,
java.lang.String[] parameterNames) |
<T> java.lang.Object |
IExpressionEvaluator.createFastEvaluator(java.lang.String expression,
java.lang.Class<T> 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 |
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. |
void |
ErrorHandler.handleError(java.lang.String message,
Location optionalLocation)
May or may not choose to throw a
CompileException . |
void |
WarningHandler.handleWarning(java.lang.String handle,
java.lang.String message,
Location optionalLocation)
May or may not choose to throw a
CompileException . |
Constructor and Description |
---|
UncheckedCompileException(CompileException compileException) |
Modifier and Type | Method and Description |
---|---|
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 |
SimpleCompiler.cook(java.lang.String optionalFileName,
java.io.Reader r) |
void |
ScriptEvaluator.cook(java.lang.String optionalFileName,
java.io.Reader r) |
void |
ClassBodyEvaluator.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) |
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
private static CompileException |
UnitCompiler.compileException(Java.Locatable locatable,
java.lang.String message) |
protected CompileException |
Parser.compileException(java.lang.String message)
Convenience method for throwing a
CompileException . |
Modifier and Type | Method and Description |
---|---|
private void |
UnitCompiler.addFields(Java.FieldDeclaration fd,
ClassFile cf)
Creates
ClassFile.FieldInfo s for all fields declared by the given Java.FieldDeclaration . |
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
|
private void |
UnitCompiler.assignmentConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
java.lang.Object optionalConstantValue)
Implements "assignment conversion" (JLS7 5.2).
|
private java.lang.Object |
UnitCompiler.assignmentConversion(Java.Locatable locatable,
java.lang.Object value,
IClass targetType)
Implements "assignment conversion" (JLS7 5.2) on a constant value.
|
(package private) void |
UnitCompiler.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 IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2)
Implements "binary numeric promotion" (5.6.2)
|
private IClass |
UnitCompiler.binaryNumericPromotion(Java.Locatable locatable,
IClass type1,
CodeContext.Inserter convertInserter1,
IClass type2,
CodeContext.Inserter convertInserter2)
Implements "binary numeric promotion" (5.6.2), which may perform unboxing conversion.
|
private IClass |
UnitCompiler.binaryNumericPromotionType(Java.Locatable locatable,
IClass type1,
IClass type2) |
private void |
UnitCompiler.boxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private void |
UnitCompiler.buildLocalVariableMap(Java.Block block,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private java.util.Map<java.lang.String,Java.LocalVariable> |
UnitCompiler.buildLocalVariableMap(Java.BlockStatement blockStatement,
java.util.Map<java.lang.String,Java.LocalVariable> localVars)
Computes and fills in the 'local variable map' for the given
blockStatement . |
protected void |
UnitCompiler.buildLocalVariableMap(Java.CatchClause catchClause,
java.util.Map<java.lang.String,Java.LocalVariable> localVars)
Adds the given
localVars to the 'local variable map' of the given catchClause . |
private void |
UnitCompiler.buildLocalVariableMap(Java.DoStatement ds,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.ForEachStatement fes,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.ForStatement fs,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.FunctionDeclarator fd) |
private void |
UnitCompiler.buildLocalVariableMap(Java.IfStatement is,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.Initializer i,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private java.util.Map<java.lang.String,Java.LocalVariable> |
UnitCompiler.buildLocalVariableMap(Java.LabeledStatement ls,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private java.util.Map<java.lang.String,Java.LocalVariable> |
UnitCompiler.buildLocalVariableMap(Java.LocalVariableDeclarationStatement lvds,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.SwitchStatement ss,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.SynchronizedStatement ss,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.TryStatement ts,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.buildLocalVariableMap(Java.WhileStatement ws,
java.util.Map<java.lang.String,Java.LocalVariable> localVars) |
private void |
UnitCompiler.checkAccessible(IClass.IMember member,
Java.BlockStatement contextBlockStatement)
Checks whether the given
IClass.IMember is accessible in the given context, according to JLS7
6.6.1.BL1.B4. |
private void |
UnitCompiler.checkAccessible(IClass iClassDeclaringMember,
Access memberAccess,
Java.BlockStatement contextBlockStatement)
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 void |
UnitCompiler.checkAccessible(IClass type,
Java.BlockStatement contextBlockStatement)
Checks whether the given
IClass is accessible in the given context, according to JLS7 6.6.1.2 and
6.6.1.4. |
private void |
UnitCompiler.checkThrownException(Java.Locatable locatable,
IClass type,
Java.Scope scope) |
private void |
UnitCompiler.checkThrownExceptions(Java.Invocation in,
IClass.IMethod iMethod) |
void |
UnitCompiler.Compilable.compile() |
boolean |
Compiler.compile(java.io.File[] sourceFiles)
Reads a set of Java™ compilation units (a.k.a.
|
private boolean |
UnitCompiler.compile(Java.BlockStatement bs) |
private void |
UnitCompiler.compile(Java.FunctionDeclarator fd,
ClassFile classFile) |
private void |
UnitCompiler.compile(Java.Rvalue rv)
Some
Java.Rvalue s compile more efficiently when their value is not needed, e.g. |
private void |
UnitCompiler.compile(Java.TypeDeclaration td) |
boolean |
Compiler.compile(Resource[] sourceResources)
|
private boolean |
UnitCompiler.compile2(Java.AlternateConstructorInvocation aci) |
private void |
UnitCompiler.compile2(Java.AnonymousClassDeclaration acd) |
private boolean |
UnitCompiler.compile2(Java.AssertStatement as) |
private void |
UnitCompiler.compile2(Java.Assignment a) |
private boolean |
UnitCompiler.compile2(Java.Block b) |
private boolean |
UnitCompiler.compile2(Java.BreakStatement bs) |
private void |
UnitCompiler.compile2(Java.ClassDeclaration cd) |
private boolean |
UnitCompiler.compile2(Java.ContinueStatement cs) |
private void |
UnitCompiler.compile2(Java.Crement c) |
private boolean |
UnitCompiler.compile2(Java.DoStatement ds) |
private boolean |
UnitCompiler.compile2(Java.ExpressionStatement ee) |
private boolean |
UnitCompiler.compile2(Java.FieldDeclaration fd) |
private boolean |
UnitCompiler.compile2(Java.ForEachStatement fes) |
private boolean |
UnitCompiler.compile2(Java.ForStatement fs) |
private boolean |
UnitCompiler.compile2(Java.IfStatement is) |
private boolean |
UnitCompiler.compile2(Java.Initializer i) |
private void |
UnitCompiler.compile2(Java.InnerClassDeclaration icd) |
private void |
UnitCompiler.compile2(Java.InterfaceDeclaration id) |
private boolean |
UnitCompiler.compile2(Java.LabeledStatement ls) |
private void |
UnitCompiler.compile2(Java.LocalClassDeclaration lcd) |
private boolean |
UnitCompiler.compile2(Java.LocalClassDeclarationStatement lcds) |
private boolean |
UnitCompiler.compile2(Java.LocalVariableDeclarationStatement lvds) |
private void |
UnitCompiler.compile2(Java.MemberClassDeclaration mcd) |
private void |
UnitCompiler.compile2(Java.PackageMemberTypeDeclaration pmtd) |
private void |
UnitCompiler.compile2(Java.ParenthesizedExpression pe) |
private boolean |
UnitCompiler.compile2(Java.ReturnStatement rs) |
private void |
UnitCompiler.compile2(Java.Rvalue rv) |
private boolean |
UnitCompiler.compile2(Java.SuperConstructorInvocation sci) |
private boolean |
UnitCompiler.compile2(Java.SwitchStatement ss) |
private boolean |
UnitCompiler.compile2(Java.SynchronizedStatement ss) |
private boolean |
UnitCompiler.compile2(Java.ThrowStatement ts) |
private boolean |
UnitCompiler.compile2(Java.TryStatement ts) |
private boolean |
UnitCompiler.compile2(Java.WhileStatement ws) |
private IClass |
UnitCompiler.compileArithmeticBinaryOperation(Java.Locatable locatable,
IClass lhsType,
java.lang.String operator,
Java.Rvalue rhs)
The LHS operand of type
lhsType is expected on the stack. |
private IClass |
UnitCompiler.compileArithmeticOperation(Java.Locatable locatable,
IClass type,
java.util.Iterator<Java.Rvalue> operands,
java.lang.String operator)
Execute an arithmetic operation on a sequence of
operands . |
private void |
UnitCompiler.compileBoolean(Java.Rvalue rv,
CodeContext.Offset dst,
boolean orientation)
Some
Java.Rvalue s compile more efficiently when their value is the condition for a branch. |
private void |
UnitCompiler.compileBoolean2(Java.BinaryOperation bo,
CodeContext.Offset dst,
boolean orientation) |
private void |
UnitCompiler.compileBoolean2(Java.ParenthesizedExpression pe,
CodeContext.Offset dst,
boolean orientation) |
private void |
UnitCompiler.compileBoolean2(Java.Rvalue rv,
CodeContext.Offset dst,
boolean orientation) |
private void |
UnitCompiler.compileBoolean2(Java.UnaryOperation ue,
CodeContext.Offset dst,
boolean orientation) |
private void |
UnitCompiler.compileBridgeMethod(ClassFile cf,
IClass.IMethod base,
IClass.IMethod override)
Compiles a bridge method which will add a method of the signature of base that delegates to override.
|
private int |
UnitCompiler.compileContext(Java.Rvalue rv)
Generates code that determines the context of the
Java.Rvalue and puts it on the operand stack. |
private int |
UnitCompiler.compileContext2(Java.AmbiguousName an) |
private int |
UnitCompiler.compileContext2(Java.ArrayAccessExpression aae) |
private int |
UnitCompiler.compileContext2(Java.ArrayLength al) |
private int |
UnitCompiler.compileContext2(Java.FieldAccess fa) |
private int |
UnitCompiler.compileContext2(Java.FieldAccessExpression fae) |
private int |
UnitCompiler.compileContext2(Java.ParenthesizedExpression pe) |
private int |
UnitCompiler.compileContext2(Java.SuperclassFieldAccessExpression scfae) |
private void |
UnitCompiler.compileDeclaredMemberTypes(Java.TypeDeclaration decl,
ClassFile cf)
Compile all of the types for this declaration
|
private void |
UnitCompiler.compileDeclaredMethods(Java.AbstractTypeDeclaration typeDeclaration,
ClassFile cf)
Compile all of the methods for this declaration
|
private void |
UnitCompiler.compileDeclaredMethods(Java.TypeDeclaration typeDeclaration,
ClassFile cf,
int startPos)
Compile methods for this declaration starting at
startPos . |
private void |
UnitCompiler.compileError(java.lang.String message)
Equivalent with
UnitCompiler.compileError(String, Location) with a null location argument. |
private void |
UnitCompiler.compileError(java.lang.String message,
Location optionalLocation)
Issue a compile error with the given message.
|
private IClass |
UnitCompiler.compileGet(Java.Rvalue rv)
Generates code that determines the value of the
Java.Rvalue and puts it on the operand stack. |
private IClass |
UnitCompiler.compileGet2(Java.AmbiguousName an) |
private IClass |
UnitCompiler.compileGet2(Java.ArrayAccessExpression aae) |
private IClass |
UnitCompiler.compileGet2(Java.Assignment a) |
private IClass |
UnitCompiler.compileGet2(Java.BinaryOperation bo) |
private IClass |
UnitCompiler.compileGet2(Java.BooleanRvalue brv) |
private IClass |
UnitCompiler.compileGet2(Java.Cast c) |
private IClass |
UnitCompiler.compileGet2(Java.ClassLiteral cl) |
private IClass |
UnitCompiler.compileGet2(Java.ConditionalExpression ce) |
private IClass |
UnitCompiler.compileGet2(Java.Crement c) |
private IClass |
UnitCompiler.compileGet2(Java.FieldAccess fa) |
private IClass |
UnitCompiler.compileGet2(Java.FieldAccessExpression fae) |
private IClass |
UnitCompiler.compileGet2(Java.Instanceof io) |
private IClass |
UnitCompiler.compileGet2(Java.Literal l) |
private IClass |
UnitCompiler.compileGet2(Java.MethodInvocation mi) |
private IClass |
UnitCompiler.compileGet2(Java.NewAnonymousClassInstance naci) |
private IClass |
UnitCompiler.compileGet2(Java.NewArray na) |
private IClass |
UnitCompiler.compileGet2(Java.NewClassInstance nci) |
private IClass |
UnitCompiler.compileGet2(Java.NewInitializedArray nia) |
private IClass |
UnitCompiler.compileGet2(Java.ParameterAccess pa) |
private IClass |
UnitCompiler.compileGet2(Java.ParenthesizedExpression pe) |
private IClass |
UnitCompiler.compileGet2(Java.QualifiedThisReference qtr) |
private IClass |
UnitCompiler.compileGet2(Java.SimpleConstant sl) |
private IClass |
UnitCompiler.compileGet2(Java.SuperclassFieldAccessExpression scfae) |
private IClass |
UnitCompiler.compileGet2(Java.SuperclassMethodInvocation scmi) |
private IClass |
UnitCompiler.compileGet2(Java.ThisReference tr) |
private IClass |
UnitCompiler.compileGet2(Java.UnaryOperation uo) |
private void |
UnitCompiler.compileGetValue(Java.ArrayInitializer ai,
IClass arrayType) |
private IClass |
UnitCompiler.compileGetValue(Java.Rvalue rv)
Convenience function that calls
#compileContext(Rvalue) and #compileGet(Rvalue) . |
private void |
UnitCompiler.compileSet(Java.Lvalue lv)
Generates code that stores a value in the
Java.Lvalue . |
private void |
UnitCompiler.compileSet2(Java.AmbiguousName an) |
private void |
UnitCompiler.compileSet2(Java.ArrayAccessExpression aae) |
private void |
UnitCompiler.compileSet2(Java.FieldAccess fa) |
private void |
UnitCompiler.compileSet2(Java.FieldAccessExpression fae) |
private void |
UnitCompiler.compileSet2(Java.ParenthesizedExpression pe) |
private void |
UnitCompiler.compileSet2(Java.SuperclassFieldAccessExpression scfae) |
private boolean |
UnitCompiler.compileStatements(java.util.List<? extends Java.BlockStatement> statements) |
private IClass |
UnitCompiler.compileStringConcatenation(Java.Locatable locatable,
IClass type,
Java.Rvalue operand,
java.util.Iterator<Java.Rvalue> operands) |
protected java.lang.Class |
ClassBodyEvaluator.compileToClass(Java.CompilationUnit compilationUnit)
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.
|
private boolean |
UnitCompiler.compileUnconditionalLoop(Java.ContinuableStatement cs,
Java.BlockStatement body,
Java.Rvalue[] optionalUpdate) |
private boolean |
UnitCompiler.compileUnconditionalLoopWithUpdate(Java.ContinuableStatement cs,
Java.BlockStatement body,
Java.Rvalue[] update) |
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. |
private IClass |
UnitCompiler.convertToPrimitiveNumericType(Java.Locatable locatable,
IClass type)
If the given type is a primitive type, return that type.
|
void |
SimpleCompiler.cook(Java.CompilationUnit compilationUnit)
Cooks this compilation unit directly.
|
void |
ScriptEvaluator.cook(Parser[] parsers) |
void |
ScriptEvaluator.cook(java.io.Reader[] readers) |
void |
SimpleCompiler.cook(Scanner scanner)
Scans, parses and ompiles a given compilation unit from the given scanner.
|
void |
ScriptEvaluator.cook(Scanner scanner) |
void |
ClassBodyEvaluator.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)
Scans, parses and compiles a given compilation unit from the given
Reader . |
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)
Deprecated.
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)
|
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)
|
static java.lang.Object |
ScriptEvaluator.createFastScriptEvaluator(java.lang.String script,
java.lang.Class interfaceToImplement,
java.lang.String[] parameterNames)
|
java.lang.Object |
ClassBodyEvaluator.createInstance(java.io.Reader reader) |
void |
Java.InnerClassDeclaration.defineSyntheticField(IClass.IField iField)
Inner classes have zero or more synthetic fields that hold references to their enclosing
context:
this$n
(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. |
void |
Java.ClassDeclaration.defineSyntheticField(IClass.IField iField) |
private void |
UnitCompiler.determineValue(Java.FieldAccessExpression fae) |
private void |
UnitCompiler.determineValue(Java.SuperclassFieldAccessExpression scfae)
"super.fld", "Type.super.fld"
|
private boolean |
UnitCompiler.fakeCompile(Java.BlockStatement bs)
Called to check whether the given
Java.Rvalue compiles or not. |
private void |
UnitCompiler.fakeCompile(Java.Rvalue rv)
Called to check whether the given
Java.Rvalue compiles or not. |
private IClass.IMethod |
UnitCompiler.fakeIMethod(IClass targetType,
java.lang.String name,
Java.Rvalue[] arguments) |
protected Java.CompilationUnit |
JavaSourceIClassLoader.findCompilationUnit(java.lang.String className)
Finds the Java™ source file for the named class through the configured 'source resource finder' and
parses it.
|
IClass.IConstructor |
IClass.findIConstructor(IClass[] parameterTypes) |
private IClass.IField |
UnitCompiler.findIField(IClass iClass,
java.lang.String name,
Location location)
Finds a named field in the given
IClass . |
private IClass.IMethod |
UnitCompiler.findIMethod(IClass targetType,
Java.Invocation invocation)
Find a
IClass.IMethod in the given targetType , its superclasses or superinterfaces with the
given name and for the given arguments . |
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 superclassMethodInvocation) |
IClass.IMethod |
IClass.findIMethod(java.lang.String methodName,
IClass[] parameterTypes) |
private IClass |
UnitCompiler.findMemberType(IClass iClass,
java.lang.String name,
Location location)
Finds a named type in the given
IClass . |
(package private) IClass[] |
IClass.findMemberType(java.lang.String optionalName)
|
private void |
IClass.findMemberType(java.lang.String optionalName,
java.util.Collection<IClass> result) |
IClass.IInvocable |
UnitCompiler.findMostSpecificIInvocable(Java.Locatable locatable,
IClass.IInvocable[] iInvocables,
IClass[] argumentTypes,
boolean boxingPermitted,
Java.Scope contextScope)
Determine the applicable invocables and choose the most specific invocable.
|
private IClass.IInvocable |
UnitCompiler.findMostSpecificIInvocable(Java.Locatable locatable,
IClass.IInvocable[] iInvocables,
Java.Rvalue[] arguments,
Java.Scope contextScope)
Determine the arguments' types, determine the applicable invocables and choose the most specific invocable
and adjust arguments as needed (for varargs case).
|
private IClass |
UnitCompiler.findTypeByFullyQualifiedName(Location location,
java.lang.String[] identifiers)
Attempts to load an
IClass by fully-qualified name through UnitCompiler.iClassLoader . |
private IClass |
UnitCompiler.findTypeByName(Location location,
java.lang.String className)
Find the named
IClass in this compilation unit, or through the UnitCompiler.iClassLoader . |
private boolean |
UnitCompiler.generatesCode(Java.BlockStatement bs)
Checks whether invocation of
#compile(BlockStatement) would generate more than zero code bytes. |
private boolean |
UnitCompiler.generatesCode2(Java.Block b) |
private boolean |
UnitCompiler.generatesCode2(Java.FieldDeclaration fd) |
private boolean |
UnitCompiler.generatesCode2(Java.Initializer i) |
private boolean |
UnitCompiler.generatesCode2(java.util.List<Java.BlockStatement> l) |
java.lang.Object |
ReflectionIClass.ReflectionIField.getConstantValue()
This implementation of
IClass.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. |
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.
|
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.AmbiguousName an) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.BinaryOperation bo) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.Cast c) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.ConditionalExpression ce) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.FieldAccess fa) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.FloatingPointLiteral fpl) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.IntegerLiteral il) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.ParenthesizedExpression pe) |
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.UnaryOperation uo) |
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() |
private Java.ClassDeclaration |
UnitCompiler.getDeclaringClass(Java.QualifiedThisReference qtr) |
IClass |
IClass.getDeclaringIClass() |
protected abstract IClass |
IClass.getDeclaringIClass2() |
protected IClass |
ClassFileIClass.getDeclaringIClass2() |
private Java.TypeBodyDeclaration |
UnitCompiler.getDeclaringTypeBodyDeclaration(Java.QualifiedThisReference qtr) |
java.lang.String |
IClass.IInvocable.getDescriptor()
Returns the method descriptor of this constructor or method.
|
java.lang.String |
IClass.IField.getDescriptor() |
abstract java.lang.String |
IClass.IInvocable.getDescriptor2()
Uncached implementation of
IClass.IInvocable.getDescriptor() . |
java.lang.String |
IClass.IConstructor.getDescriptor2()
Opposed to
IClass.IInvocable.getParameterTypes() , the method descriptor returned by this method does include the
optionally leading synthetic parameters. |
java.lang.String |
IClass.IMethod.getDescriptor2() |
private void |
UnitCompiler.getfield(Java.Locatable locatable,
IClass.IField iField) |
private IClass |
UnitCompiler.getIClass(Java.ThisReference tr) |
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<IClass.IMethod> 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 . |
private void |
IClass.getIMethods(java.util.List<IClass.IMethod> result) |
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.LocalVariable |
UnitCompiler.getLocalVariable(Java.FunctionDeclarator.FormalParameter parameter) |
Java.LocalVariable |
UnitCompiler.getLocalVariable(Java.FunctionDeclarator.FormalParameter parameter,
boolean isVariableArityParameter) |
Java.LocalVariable |
UnitCompiler.getLocalVariable(Java.LocalVariableDeclarationStatement lvds,
Java.VariableDeclarator vd) |
private java.lang.Object |
UnitCompiler.getNegatedConstantValue(Java.Rvalue rv)
Attempts to evaluate the negated value of a constant
Java.Rvalue . |
private java.lang.Object |
UnitCompiler.getNegatedConstantValue2(Java.IntegerLiteral il) |
private java.lang.Object |
UnitCompiler.getNegatedConstantValue2(Java.ParenthesizedExpression pe) |
private java.lang.Object |
UnitCompiler.getNegatedConstantValue2(Java.Rvalue rv) |
private java.lang.Object |
UnitCompiler.getNegatedConstantValue2(Java.UnaryOperation uo) |
(package private) Java.ArrayInitializerOrRvalue |
UnitCompiler.getNonConstantFinalInitializer(Java.FieldDeclaration fd,
Java.VariableDeclarator vd)
Determine the non-constant-final initializer of the given
Java.VariableDeclarator . |
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 IClass |
ReflectionIClass.getOuterIClass2() |
protected abstract IClass |
IClass.getOuterIClass2() |
protected IClass |
ClassFileIClass.getOuterIClass2() |
IClass[] |
IClass.IInvocable.getParameterTypes()
Returns the types of the parameters of this constructor or method.
|
IClass[] |
ReflectionIClass.ReflectionIConstructor.getParameterTypes2() |
abstract IClass[] |
IClass.IInvocable.getParameterTypes2() |
abstract IClass[] |
IClass.IConstructor.getParameterTypes2()
Opposed to
Constructor.getParameterTypes() , the
return value of this method does not include the optionally leading "synthetic
parameters". |
private IClass |
UnitCompiler.getReferenceType(Location location,
Java.Scope scope,
java.lang.String[] identifiers,
int n) |
private IClass |
UnitCompiler.getReferenceType(Location location,
java.lang.String simpleTypeName,
Java.Scope scope)
JLS7 6.5.5.1 Simple type name (single identifier)
|
abstract IClass |
IClass.IMethod.getReturnType() |
private IClass |
UnitCompiler.getReturnType(Java.FunctionDeclarator fd) |
java.lang.String[] |
UnitCompiler.getSingleTypeImport(java.lang.String name,
Location location)
Check if the given simple name was imported through a single type import.
|
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() |
private IClass |
UnitCompiler.getTargetIClass(Java.QualifiedThisReference qtr) |
IClass[] |
IClass.IInvocable.getThrownExceptions()
Returns the types thrown by this constructor or method.
|
abstract IClass[] |
IClass.IInvocable.getThrownExceptions2() |
abstract IClass |
IClass.IField.getType() |
private IClass |
UnitCompiler.getType(Java.Atom a) |
private IClass |
UnitCompiler.getType2(Java.AmbiguousName an) |
private IClass |
UnitCompiler.getType2(Java.ArrayAccessExpression aae) |
private IClass |
UnitCompiler.getType2(Java.ArrayType at) |
private IClass |
UnitCompiler.getType2(Java.Assignment a) |
private IClass |
UnitCompiler.getType2(Java.BinaryOperation bo) |
private IClass |
UnitCompiler.getType2(Java.Cast c) |
private IClass |
UnitCompiler.getType2(Java.ConditionalExpression ce) |
private IClass |
UnitCompiler.getType2(Java.Crement c) |
private IClass |
UnitCompiler.getType2(Java.FieldAccess fa) |
private IClass |
UnitCompiler.getType2(Java.FieldAccessExpression fae) |
private IClass |
UnitCompiler.getType2(Java.MethodInvocation mi) |
private IClass |
UnitCompiler.getType2(Java.NewArray na) |
private IClass |
UnitCompiler.getType2(Java.NewClassInstance nci) |
private IClass |
UnitCompiler.getType2(Java.NewInitializedArray nia) |
private IClass |
UnitCompiler.getType2(Java.Package p) |
private IClass |
UnitCompiler.getType2(Java.ParameterAccess pa) |
private IClass |
UnitCompiler.getType2(Java.ParenthesizedExpression pe) |
private IClass |
UnitCompiler.getType2(Java.QualifiedThisReference qtr) |
private IClass |
UnitCompiler.getType2(Java.ReferenceType rt) |
private IClass |
UnitCompiler.getType2(Java.RvalueMemberType rvmt) |
private IClass |
UnitCompiler.getType2(Java.SuperclassFieldAccessExpression scfae) |
private IClass |
UnitCompiler.getType2(Java.SuperclassMethodInvocation scmi) |
private IClass |
UnitCompiler.getType2(Java.ThisReference tr) |
private IClass |
UnitCompiler.getType2(Java.UnaryOperation uo) |
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 |
FilterWarningHandler.handleWarning(java.lang.String handle,
java.lang.String message,
Location optionalLocation) |
private boolean |
UnitCompiler.hasAnnotation(Java.FunctionDeclarator fd,
IClass methodAnnotation) |
boolean |
IClass.hasIMethod(java.lang.String methodName,
IClass[] parameterTypes) |
private static int |
UnitCompiler.hex2Int(Java.Locatable locatable,
java.lang.String value) |
private static long |
UnitCompiler.hex2Long(Java.Locatable locatable,
java.lang.String value) |
boolean |
IClass.implementsInterface(IClass that)
If
this represents a class: Return true if this class
directly or indirectly implements that interface. |
private void |
UnitCompiler.import2(Java.CompilationUnit.SingleStaticImportDeclaration ssid) |
private void |
UnitCompiler.import2(Java.CompilationUnit.StaticImportOnDemandDeclaration siodd) |
private IClass |
UnitCompiler.importSingleType(java.lang.String simpleTypeName,
Location location)
If the given name was declared in a simple type import, load that class.
|
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. |
(package private) void |
UnitCompiler.initializeInstanceVariablesAndInvokeInstanceInitializers(Java.ConstructorDeclarator cd)
Compiles the instance variable initializers and the instance initializers in their lexical order.
|
private java.lang.String |
UnitCompiler.internalCheckAccessible(IClass iClassDeclaringMember,
Access memberAccess,
Java.Scope contextScope) |
private java.lang.String |
UnitCompiler.internalCheckAccessible(IClass type,
Java.Scope contextScope) |
private void |
UnitCompiler.invoke(Java.Locatable locatable,
IClass.IConstructor iConstructor) |
private void |
UnitCompiler.invoke(Java.Locatable locatable,
IClass.IMethod iMethod) |
private void |
UnitCompiler.invokeConstructor(Java.Locatable locatable,
Java.Scope scope,
Java.Rvalue optionalEnclosingInstance,
IClass targetClass,
Java.Rvalue[] arguments)
Expects the object to initialize on the stack.
|
private boolean |
UnitCompiler.isAccessible(IClass.IMember member,
Java.Scope contextScope)
Determines whether the given
IClass.IMember is accessible in the given context, according to
JLS7 6.6.1.BL1.B4. |
private boolean |
UnitCompiler.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 boolean |
UnitCompiler.isAccessible(IClass type,
Java.Scope contextScope)
Determines whether the given
IClass is accessible in the given context, according to JLS7 6.6.1.2 and
6.6.1.4. |
boolean |
IClass.isAssignableFrom(IClass that)
Determine if "this" is assignable from "that".
|
private boolean |
UnitCompiler.isCastReferenceConvertible(IClass sourceType,
IClass targetType)
JLS7 5.5
|
(package private) Java.LocalVariable |
UnitCompiler.isIntLv(Java.Crement c)
Checks whether the operand is an integer-like local variable.
|
boolean |
IClass.IInvocable.isLessSpecificThan(IClass.IInvocable that) |
private boolean |
UnitCompiler.isMethodInvocationConvertible(IClass sourceType,
IClass targetType,
boolean boxingPermitted)
Checks if "method invocation conversion" (5.3) is possible.
|
boolean |
IClass.IInvocable.isMoreSpecificThan(IClass.IInvocable that) |
private boolean |
UnitCompiler.isNarrowingReferenceConvertible(IClass sourceType,
IClass targetType)
Check whether "narrowing reference conversion" (JLS7 5.1.5) is possible.
|
boolean |
IClass.isSubclassOf(IClass that)
Returns
true if this class is an immediate or non-immediate
subclass of that class. |
private boolean |
UnitCompiler.isType(Java.Atom a) |
private boolean |
UnitCompiler.isType2(Java.AmbiguousName an) |
private boolean |
UnitCompiler.isWideningReferenceConvertible(IClass sourceType,
IClass targetType)
Checks if "widening reference conversion" (5.1.4) is possible.
|
protected Java.CompilationUnit |
ClassBodyEvaluator.makeCompilationUnit(Parser optionalParser)
Create a
Java.CompilationUnit , set the default imports, and parse the import declarations. |
protected java.util.List<Java.BlockStatement> |
ScriptEvaluator.makeStatements(int idx,
Parser parser)
Fills the given
block by parsing statements until EOF and adding them to the block. |
protected java.util.List<Java.BlockStatement> |
ExpressionEvaluator.makeStatements(int idx,
Parser parser) |
private void |
UnitCompiler.maybeCreateInitMethod(Java.AbstractTypeDeclaration decl,
ClassFile cf,
java.util.List<Java.BlockStatement> statements)
Create class initialization method iff there is any initialization code.
|
private static int |
UnitCompiler.oct2Int(Java.Locatable locatable,
java.lang.String value) |
private static long |
UnitCompiler.oct2Long(Java.Locatable locatable,
java.lang.String value) |
private boolean |
UnitCompiler.overridesMethod(IClass.IMethod method,
IClass type) |
private boolean |
UnitCompiler.overridesMethodFromSupertype(IClass.IMethod m,
IClass type) |
Java.Atom |
Parser.parseAdditiveExpression()
AdditiveExpression :=
MultiplicativeExpression { ( '+' | '-' ) MultiplicativeExpression }
|
Java.Atom |
Parser.parseAndExpression()
AndExpression :=
EqualityExpression { '&' EqualityExpression }
|
private Java.Annotation |
Parser.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 } ]
|
Java.Rvalue[] |
Parser.parseArgumentList()
ArgumentList := Expression { ',' Expression }
|
Java.Rvalue[] |
Parser.parseArguments()
Arguments := '(' [ ArgumentList ] ')'
|
Java.ArrayInitializer |
Parser.parseArrayInitializer()
ArrayInitializer :=
'{' [ VariableInitializer { ',' VariableInitializer } [ ',' ] '}'
|
Java.Statement |
Parser.parseAssertStatement()
AssertStatement := 'assert' Expression [ ':' Expression ] ';'
|
Java.Atom |
Parser.parseAssignmentExpression()
AssignmentExpression :=
ConditionalExpression [ AssignmentOperator AssignmentExpression ]
AssignmentOperator :=
'=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' |
'>>=' | '>>>=' | '&=' | '^=' | '|='
|
Java.Block |
Parser.parseBlock()
'{' BlockStatements '}'
|
Java.BlockStatement |
Parser.parseBlockStatement()
BlockStatement := { Identifier ':' } (
( Modifiers Type | ModifiersOpt BasicType ) VariableDeclarators ';' |
'class' ...
|
java.util.List<Java.BlockStatement> |
Parser.parseBlockStatements()
BlockStatements := { BlockStatement }
|
(package private) int |
Parser.parseBracketsOpt()
BracketsOpt := { '[' ']' }
|
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 (JLS7 8.6) or static initializer (JLS7 8.7)
'void' Identifier MethodDeclarationRest |
'class' ClassDeclarationRest |
'interface' InterfaceDeclarationRest |
ConstructorDeclarator |
Type Identifier (
MethodDeclarationRest |
FieldDeclarationRest ';'
)
)
|
Java.NamedClassDeclaration |
Parser.parseClassDeclarationRest(java.lang.String optionalDocComment,
Java.Modifiers modifiers,
Parser.ClassDeclarationContext context)
ClassDeclarationRest :=
Identifier [ typeParameters ]
[ 'extends' ReferenceType ]
[ 'implements' ReferenceTypeList ]
ClassBody
|
Java.CompilationUnit |
Parser.parseCompilationUnit()
CompilationUnit := [ PackageDeclaration ]
{ ImportDeclaration }
{ TypeDeclaration }
|
private Java.CompilationUnit |
Compiler.parseCompilationUnit(java.lang.String fileName,
java.io.InputStream inputStream,
java.lang.String optionalCharacterEncoding)
Read one compilation unit from a file and parse it.
|
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,
Java.Modifiers 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 ')' ';'
|
private Java.ElementValue |
Parser.parseElementValue()
ElementValue :=
ConditionalExpression
| Annotation
| ElementValueArrayInitializer
|
private Java.ElementValue |
Parser.parseElementValueArrayInitializer()
ElementValueArrayInitializer := '{' { ElementValue | ',' } '}'
|
private Java.ElementValuePair |
Parser.parseElementValuePair()
ElementValuePair := Identifier '=' ElementValue
|
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(boolean[] hasEllipsis)
FormalParameter := [ 'final' ] Type [ '.' '.' '.' ] Identifier BracketsOpt
|
Java.FunctionDeclarator.FormalParameters |
Parser.parseFormalParameters()
FormalParameters := '(' [ FormalParameter { ',' FormalParameter } ] ')'
|
Java.Statement |
Parser.parseForStatement()
ForStatement :=
'for' '(' [ ForInit ] ';' [ Expression ] ';' [ ExpressionList ] ')' Statement
| 'for' '(' FormalParameter ':' Expression ')' Statement
ForInit :=
Modifiers Type VariableDeclarators
| ModifiersOpt BasicType VariableDeclarators
| Expression VariableDeclarators (1)
| Expression { ',' Expression }
|
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,
Java.Modifiers modifiers,
Parser.InterfaceDeclarationContext context)
InterfaceDeclarationRest :=
Identifier [ typeParameters ]
[ 'extends' ReferenceTypeList ]
InterfaceBody
|
Java.Statement |
Parser.parseLabeledStatement()
LabeledStatement := Identifier ':' Statement
|
Java.Rvalue |
Parser.parseLiteral()
Literal :=
IntegerLiteral
| FloatingPointLiteral
| BooleanLiteral
| CharacterLiteral
| StringLiteral
| NullLiteral
|
Java.Block |
Parser.parseMethodBody()
MethodBody := Block
|
Java.MethodDeclarator |
Parser.parseMethodDeclarationRest(java.lang.String optionalDocComment,
Java.Modifiers modifiers,
Java.Type type,
java.lang.String name)
MethodDeclarationRest :=
FormalParameters
{ '[' ']' }
[ 'throws' ReferenceTypeList ]
( ';' | MethodBody )
|
Java.Modifiers |
Parser.parseModifiers()
ModifiersAndAnnotations := { 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native'
| 'synchronized' | 'transient' | 'volatile' | 'strictfp' | Annotation }
|
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 [ TypeArguments ]
|
Java.ReferenceType[] |
Parser.parseReferenceTypeList()
ReferenceTypeList := ReferenceType { ',' ReferenceType }
|
Java.Atom |
Parser.parseRelationalExpression()
RelationalExpression :=
ShiftExpression {
'instanceof' ReferenceType
| '<' ShiftExpression [ { ',' TypeArgument } '>' ]
| '<' TypeArgument [ { ',' TypeArgument } '>' ]
| ( '>' | '<=' | '>=' ) ShiftExpression
}
|
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 (JLS7 8.8.7.1)
'.' 'super' '.' Identifier | // SuperclassFieldReference (JLS7 15.11.2)
'.' 'super' '.' Identifier Arguments | // SuperclassMethodInvocation (JLS7 15.12.3)
'.' '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
) { '[' ']' }
|
private Java.TypeArgument |
Parser.parseTypeArgument()
TypeArgument :=
ReferenceType { '[' ']' } <= The optional brackets are mising in JLS7, section 18!?
| BasicType '[' ']' { '[' ']' }
| '?' extends ReferenceType
| '?' super ReferenceType
|
private Java.TypeArgument[] |
Parser.parseTypeArgumentsOpt()
TypeArguments := '<' TypeArgument { ',' TypeArgument } '>'
|
private Java.TypeParameter |
Parser.parseTypeParameter()
TypeParameter := identifier [ 'extends' ( identifier | ReferenceType { '&' ReferenceType }
|
private Java.TypeParameter[] |
Parser.parseTypeParametersOpt()
TypeParameters := '<' TypeParameter { ',' TypeParameter } '>'
|
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.VariableDeclarator[] |
Parser.parseVariableDeclarators()
VariableDeclarators := VariableDeclarator { ',' VariableDeclarator }
|
Java.ArrayInitializerOrRvalue |
Parser.parseVariableInitializer()
VariableInitializer :=
ArrayInitializer |
Expression
|
Java.Statement |
Parser.parseWhileStatement()
WhileStatement := 'while' '(' Expression ')' Statement
|
Scanner.Token |
Parser.peek() |
int |
Parser.peek(int[] suspected)
Checks whether the type of the next token is any of the
suspected ; does not consume the next token. |
boolean |
Parser.peek(java.lang.String suspected) |
int |
Parser.peek(java.lang.String[] suspected)
Checks whether the value of the next token equals any of the
suspected ; does not consume the next
token. |
boolean |
Parser.peekEof() |
java.lang.String |
Parser.peekIdentifier() |
boolean |
Parser.peekLiteral() |
Scanner.Token |
Parser.peekNextButOne() |
boolean |
Parser.peekNextButOne(java.lang.String suspected) |
boolean |
Parser.peekRead(java.lang.String suspected) |
int |
Parser.peekRead(java.lang.String[] values) |
Scanner.Token |
Scanner.produce()
Preduces and returns the next token.
|
private IClass |
UnitCompiler.pushConstant(Java.Locatable locatable,
java.lang.Object value) |
private void |
UnitCompiler.putfield(Java.Locatable locatable,
IClass.IField iField) |
Scanner.Token |
Parser.read() |
void |
Parser.read(java.lang.String expected)
Verifies that the value of the next token equals
expected , and consumes the token. |
int |
Parser.read(java.lang.String[] expected)
Verifies that the value of the next token equals one of the
expected , and consumes the token. |
java.lang.String |
Parser.readIdentifier() |
private void |
Scanner.readNextChar() |
java.lang.String |
Parser.readOperator() |
private Java.Atom |
UnitCompiler.reclassify(Java.AmbiguousName an) |
private Java.Atom |
UnitCompiler.reclassifyName(Location location,
Java.Scope scope,
java.lang.String identifier)
JLS7 6.5.2.1
|
private Java.Atom |
UnitCompiler.reclassifyName(Location location,
Java.Scope scope,
java.lang.String[] identifiers,
int n)
Reclassifies the ambiguous name consisting of the first
n of the identifiers (JLS7 6.5.2.2). |
private void |
UnitCompiler.referenceThis(Java.Locatable locatable,
Java.ClassDeclaration declaringClass,
Java.TypeBodyDeclaration declaringTypeBodyDeclaration,
IClass targetIClass) |
private IClass[] |
ClassFileIClass.resolveClasses(short[] ifs) |
private void |
UnitCompiler.reverseUnaryNumericPromotion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private void |
Scanner.scanLiteralCharacter(java.lang.StringBuilder sb)
Scans the next literal character into a
StringBuilder . |
private Scanner.Token |
Scanner.scanNumericLiteral(boolean hadDecimalPoint) |
private void |
UnitCompiler.stringConversion(Java.Locatable locatable,
IClass sourceType)
Converts object of type "sourceType" to type "String" (JLS7 15.18.1.1).
|
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) |
Java.Lvalue |
Java.Atom.toLvalueOrCompileException() |
private Java.Lvalue |
UnitCompiler.toLvalueOrCompileException(Java.Atom a) |
Java.Rvalue |
Java.Atom.toRvalueOrCompileException() |
private Java.Rvalue |
UnitCompiler.toRvalueOrCompileException(Java.Atom a) |
Java.Type |
Java.Atom.toTypeOrCompileException() |
private Java.Type |
UnitCompiler.toTypeOrCompileException(Java.Atom a) |
private boolean |
UnitCompiler.tryAssignmentConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType,
java.lang.Object optionalConstantValue) |
private boolean |
UnitCompiler.tryBoxingConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType) |
private boolean |
UnitCompiler.tryConstantAssignmentConversion(Java.Locatable locatable,
java.lang.Object constantValue,
IClass targetType)
Check if "constant assignment conversion" (JLS7 5.2, paragraph 1) is possible.
|
private boolean |
UnitCompiler.tryNarrowingReferenceConversion(Java.Locatable locatable,
IClass sourceType,
IClass targetType)
Implements "narrowing reference conversion" (5.1.5).
|
private boolean |
UnitCompiler.tryWideningReferenceConversion(IClass sourceType,
IClass targetType)
Performs "widening reference conversion" (5.1.4) if possible.
|
private IClass |
UnitCompiler.unaryNumericPromotion(Java.Locatable locatable,
IClass type)
Implements "unary numeric promotion" (JLS7 5.6.1).
|
private IClass |
UnitCompiler.unaryNumericPromotionType(Java.Locatable locatable,
IClass type) |
private void |
Parser.verifyIdentifierIsConventionalClassOrInterfaceName(java.lang.String id,
Location loc)
Issue a warning if the given identifier does not comply with the class and interface type naming conventions
(JLS7 6.8.2).
|
private void |
Parser.verifyIdentifierIsConventionalFieldName(java.lang.String id,
Location loc)
Issue 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 void |
Parser.verifyIdentifierIsConventionalLocalVariableOrParameterName(java.lang.String id,
Location loc)
Issue a warning if the given identifier does not comply with the local variable and parameter naming conventions
(JLS7 6.8.6).
|
private void |
Parser.verifyIdentifierIsConventionalMethodName(java.lang.String id,
Location loc)
Issue a warning if the given identifier does not comply with the method naming conventions (JLS7 6.8.3).
|
private void |
Parser.verifyStringIsConventionalPackageName(java.lang.String s,
Location loc)
Issue a warning if the given string does not comply with the package naming conventions.
|
private void |
UnitCompiler.warning(java.lang.String handle,
java.lang.String message,
Location optionalLocation)
Issues a warning with the given message an location an returns.
|
private void |
Scanner.warning(java.lang.String handle,
java.lang.String message,
Location optionalLocation)
Issues a warning with the given message and location and returns.
|
private void |
Parser.warning(java.lang.String handle,
java.lang.String message,
Location optionalLocation)
Issues a warning with the given message and location and returns.
|
Constructor and Description |
---|
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
|
ExpressionStatement(Java.Rvalue rvalue) |
PackageMemberClassDeclaration(Location location,
java.lang.String optionalDocComment,
Java.Modifiers modifiers,
java.lang.String name,
Java.TypeParameter[] optionalTypeParameters,
Java.Type optionalExtendedType,
Java.Type[] implementedTypes) |
PackageMemberInterfaceDeclaration(Location location,
java.lang.String optionalDocComment,
Java.Modifiers modifiers,
java.lang.String name,
Java.TypeParameter[] optionalTypeParameters,
Java.Type[] extendedTypes) |
Scanner(java.io.File file)
Deprecated.
// SUPPRESS CHECKSTYLE MissingDeprecated
|
Scanner(java.io.File file,
java.lang.String optionalEncoding)
Deprecated.
// SUPPRESS CHECKSTYLE MissingDeprecated
|
Scanner(java.lang.String fileName)
Deprecated.
// SUPPRESS CHECKSTYLE MissingDeprecated
|
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.
// SUPPRESS CHECKSTYLE MissingDeprecated
|
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
|
Modifier and Type | Method and Description |
---|---|
static void |
DeclarationCounter.main(java.lang.String[] args) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
JGrep.MethodInvocationTarget.apply(UnitCompiler uc,
Java.Invocation invocation,
IClass.IMethod method) |
(package private) static JGrep.MethodInvocationAction |
JGrep.Action.getMethodInvocationAction(java.lang.String action) |
private void |
JGrep.jGrep(java.io.File[] rootDirectories,
StringPattern[] directoryNamePatterns,
StringPattern[] fileNamePatterns,
java.util.List<JGrep.MethodInvocationTarget> methodInvocationTargets) |
private void |
JGrep.jGrep(java.util.Iterator<java.io.File> sourceFilesIterator,
java.util.List<JGrep.MethodInvocationTarget> methodInvocationTargets) |
private Java.CompilationUnit |
JGrep.parseCompilationUnit(java.io.File sourceFile,
java.lang.String optionalCharacterEncoding)
Read one compilation unit from a file and parse it.
|
private static JGrep.MethodInvocationTarget |
JGrep.parseMethodInvocationPattern(java.lang.String mip) |
private static java.lang.String |
JGrep.readIdentifierPattern(Parser p) |