Package | Description |
---|---|
org.codehaus.janino |
The classes in this package pose the core of the Janino JavaTM compiler.
|
org.codehaus.janino.util |
Application-independent helper classes.
|
Modifier and Type | Class and Description |
---|---|
static class |
Java.AmbiguousName
Representation of a JLS7 6.5.2 'ambiguous name'.
|
static class |
Java.ArrayAccessExpression
Representation of a JLS7 15.13 'array access expression'.
|
static class |
Java.ArrayLength
Representation of the JLS7 10.7 array type 'length' pseudo-member.
|
static class |
Java.Assignment
Representation of all JLS7 15.26 assignments.
|
static class |
Java.BinaryOperation
Representation of all non-operand-modifying binary operations.
|
static class |
Java.BooleanLiteral
Representation of a "boolean literal" (JLS7 3.10.3) (type
boolean ). |
static class |
Java.BooleanRvalue
Base class for
Java.Rvalue s that compile better as conditional branches. |
static class |
Java.Cast
Representation of a JLS7 15.16 'cast expression'.
|
static class |
Java.CharacterLiteral
Representation of a "character literal" (JLS7 3.10.4) (type
char ). |
static class |
Java.ClassLiteral
Representation of a JLS7 15.8.2 'class literal'.
|
static class |
Java.ConditionalExpression
Representation of a JLS7 15.25 'conditional operation'.
|
static class |
Java.Crement
Representation of a JLS7 15.14.2 'postfix increment operation', a JLS7 15.14.3 'postfix decrement operation', a
JLS7 15.15.1 'prefix increment operation' or a JLS7 15.15.2 'prefix decrement operation'.
|
static class |
Java.FieldAccess
Representation of an access to a field of a class or an interface.
|
static class |
Java.FieldAccessExpression
Representation of a JLS7 15.11 'field access expression', including the "array length" pseudo field access.
|
static class |
Java.FloatingPointLiteral
Representation of a "floating-point literal" (JLS7 3.10.2) (types
float and double ). |
static class |
Java.Instanceof
Representation of a JLS7 15.20.2 'type comparison operation'.
|
static class |
Java.IntegerLiteral
Representation of an "integer literal" (JLS7 3.10.1) (types
int and long ). |
static class |
Java.Invocation
Abstract base class for
Java.MethodInvocation and Java.SuperclassMethodInvocation . |
static class |
Java.Literal
Abstract base class for the various Java™ literals; see JLS7 3.10.
|
static class |
Java.LocalVariableAccess
Representation of a local variable access -- used during compilation.
|
static class |
Java.Lvalue
Representation of an "lvalue", i.e.
|
static class |
Java.MethodInvocation
Representation of a JLS7 15.12 'method invocation expression'.
|
static class |
Java.NewAnonymousClassInstance
Representation of a JLS7 15.9 'anonymous class instance creation expression'.
|
static class |
Java.NewArray
Representation of a JLS7 15.10 'array creation expression'.
|
static class |
Java.NewClassInstance
Representation of a JLS7 'class instance creation expression'.
|
static class |
Java.NewInitializedArray
Representation of a JLS7 15.10 'array creation expression'.
|
static class |
Java.NullLiteral
Representation of a "null literal" (JLS7 3.10.7).
|
static class |
Java.ParameterAccess
'Artificial' operation for accessing the parameters of the synthetic constructor of an anonymous class.
|
static class |
Java.ParenthesizedExpression
Representation of a JLS7 15.8.5 'parenthesized expression'.
|
static class |
Java.QualifiedThisReference
Representation of an JLS7 15.8.4 access to the current object or an enclosing instance.
|
static class |
Java.SimpleConstant
This class is not used when code is parsed; it is intended for "programmatic" literals.
|
static class |
Java.StringLiteral
Representation of a "string literal" (JLS7 3.10.5) (type
String ). |
static class |
Java.SuperclassFieldAccessExpression
Representation of an JLS7 'superclass field access expression', e.g.
|
static class |
Java.SuperclassMethodInvocation
Representation of a JLS7 15.12.1.1.3 'superclass method invocation'.
|
static class |
Java.ThisReference
Representation of an JLS7 15.8.3 access to the innermost enclosing instance.
|
static class |
Java.UnaryOperation
Representation of a JLS7 15.15.3 'unary plus operator', a JLS7 15.15.4 'unary minus operator', a JLS7 15.15.5
'bitwise complement operator' or a JLS7 15.15.6 'logical complement operator'.
|
Modifier and Type | Field and Description |
---|---|
Java.Rvalue[] |
Java.ConstructorInvocation.arguments
The arguments to pass to the constructor.
|
Java.Rvalue[] |
Java.Invocation.arguments
Arguments to pass to the method.
|
Java.Rvalue[] |
Java.NewClassInstance.arguments
The arguments to pass to the constructor.
|
Java.Rvalue[] |
Java.NewAnonymousClassInstance.arguments
The arguments to pass to the constructor.
|
Java.Rvalue |
Java.IfStatement.condition
The condition of the IF statement.
|
Java.Rvalue |
Java.WhileStatement.condition
The 'condition' of the WHILE statement.
|
Java.Rvalue |
Java.SwitchStatement.condition
The rvalue that is evaluated and matched with the CASE clauses.
|
Java.Rvalue |
Java.DoStatement.condition
The condition in the WHILE clause of this DO statement.
|
Java.Rvalue[] |
Java.NewArray.dimExprs
The sizes of the first dimensions to instantiate.
|
Java.Rvalue |
Java.ForEachStatement.expression
The 'expression' part of the 'enhanced FOR statement'.
|
Java.Rvalue |
Java.SynchronizedStatement.expression
The object reference on which the statement synchronizes.
|
Java.Rvalue |
Java.ThrowStatement.expression
The rvalue (of type
Throwable ) thrown by this THROW statement. |
Java.Rvalue |
Java.AssertStatement.expression1
The left-hand-side expression of this ASSERT statement.
|
Java.Rvalue |
Java.ArrayAccessExpression.index
The index value to use.
|
Java.Rvalue |
Java.ArrayLength.lhs
The rvalue identifying the array to determine the length of.
|
Java.Rvalue |
Java.ConditionalExpression.lhs
Left-hand side of this conditional operation.
|
Java.Rvalue |
Java.ArrayAccessExpression.lhs
The array to access (must be an
Java.Lvalue if the access is modifying). |
Java.Rvalue |
Java.Instanceof.lhs
The rvalue who's type is to be compared.
|
Java.Rvalue |
Java.BinaryOperation.lhs
The left hand side operand.
|
Java.Rvalue |
Java.ConditionalExpression.mhs
Middle-hand side of this conditional operation.
|
Java.Rvalue |
Java.UnaryOperation.operand
The rvalue to operate upon.
|
Java.Rvalue |
Java.ForStatement.optionalCondition
The optional 'condition' part of the 'basic FOR statement'.
|
Java.Rvalue |
Java.AssertStatement.optionalExpression2
The optional right-hand-side expression of this ASSERT statement.
|
Java.Rvalue |
Java.SuperConstructorInvocation.optionalQualification
The qualification for this 'qualified superclass constructor invocation', or
null iff this is an
'unqualified superclass constructor invocation'. |
Java.Rvalue |
Java.NewClassInstance.optionalQualification
The qualification of this 'qualified class instance creation expression'.
|
Java.Rvalue |
Java.NewAnonymousClassInstance.optionalQualification
The qualification iff this a 'qualified anonymous class instance creation expression'.
|
Java.Rvalue |
Java.ReturnStatement.optionalReturnValue
The optional rvalue that is returned.
|
Java.Rvalue[] |
Java.ForStatement.optionalUpdate
The optional 'update' part of the 'basic FOR statement'.
|
Java.Rvalue |
Java.Assignment.rhs
The rvalue that is assigned.
|
Java.Rvalue |
Java.ConditionalExpression.rhs
Right-hand side of this conditional operation.
|
Java.Rvalue |
Java.BinaryOperation.rhs
The right hand side operand.
|
Java.Rvalue |
Java.ExpressionStatement.rvalue
The rvalue that is evaluated when the statement is executed.
|
Java.Rvalue |
Java.RvalueMemberType.rvalue
The expression that represents the outer instance required for the instantiation of the inner type.
|
(package private) Java.Rvalue |
Java.FieldAccessExpression.value
The
Java.ArrayLength or Java.FieldAccess resulting from this 'field access expression'. |
(package private) Java.Rvalue |
Java.SuperclassFieldAccessExpression.value
The
Java.FieldAccess that implements this Java.FieldAccessExpression . |
Java.Rvalue |
Java.Cast.value
The rvalue to convert.
|
Java.Rvalue |
Java.ParenthesizedExpression.value
The rvalue in parentheses.
|
Modifier and Type | Field and Description |
---|---|
java.util.List<Java.Rvalue> |
Java.SwitchStatement.SwitchBlockStatementGroup.caseLabels
The CASE labels at the top of the 'switch block statement group'.
|
Modifier and Type | Method and Description |
---|---|
Java.Rvalue[] |
Parser.parseArgumentList()
ArgumentList := Expression { ',' Expression }
|
Java.Rvalue[] |
Parser.parseArguments()
Arguments := '(' [ ArgumentList ] ')'
|
Java.Rvalue |
Parser.parseDimExpr()
DimExpr := '[' Expression ']'
|
Java.Rvalue[] |
Parser.parseDimExprs()
DimExprs := DimExpr { DimExpr }
|
Java.Rvalue[] |
Parser.parseExpressionList()
ExpressionList := Expression { ',' Expression }
|
Java.Rvalue |
Parser.parseLiteral()
Literal :=
IntegerLiteral
| FloatingPointLiteral
| BooleanLiteral
| CharacterLiteral
| StringLiteral
| NullLiteral
|
Java.Rvalue |
Java.Atom.toRvalue() |
Java.Rvalue |
Java.Rvalue.toRvalue() |
Java.Rvalue |
Java.AmbiguousName.toRvalue() |
Java.Rvalue |
Java.Atom.toRvalueOrCompileException() |
private Java.Rvalue |
UnitCompiler.toRvalueOrCompileException(Java.Atom a) |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<Java.Rvalue> |
Java.BinaryOperation.unrollLeftAssociation()
Returns an
Iterator over a left-to-right sequence of Java.Rvalue s. |
Modifier and Type | Method and Description |
---|---|
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.compile2(Java.Rvalue rv) |
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 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.Rvalue rv,
CodeContext.Offset dst,
boolean orientation) |
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.Rvalue rv) |
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.compileGetValue(Java.Rvalue rv)
Convenience function that calls
#compileContext(Rvalue) and #compileGet(Rvalue) . |
private IClass |
UnitCompiler.compileStringConcatenation(Java.Locatable locatable,
IClass type,
Java.Rvalue operand,
java.util.Iterator<Java.Rvalue> operands) |
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) |
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) |
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).
|
java.lang.Object |
UnitCompiler.getConstantValue(Java.Rvalue rv)
Attempts to evaluate as a constant expression.
|
private java.lang.Object |
UnitCompiler.getConstantValue2(Java.Rvalue rv) |
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.Rvalue rv) |
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 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 void |
UnparseVisitor.unparseFunctionInvocationArguments(Java.Rvalue[] arguments) |
private void |
UnparseVisitor.unparseRhs(Java.Rvalue rhs,
java.lang.String binaryOperator)
Iff the
rhs is unnatural for the binaryOperator , enclose the
rhs in parentheses. |
private void |
UnparseVisitor.unparseUnaryOperation(Java.Rvalue operand,
java.lang.String unaryOperator)
Iff the
operand is unnatural for the unaryOperator , enclose the
operand in parentheses. |
Modifier and Type | Method and Description |
---|---|
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 IClass |
UnitCompiler.compileStringConcatenation(Java.Locatable locatable,
IClass type,
Java.Rvalue operand,
java.util.Iterator<Java.Rvalue> operands) |
Constructor and Description |
---|
AlternateConstructorInvocation(Location location,
Java.Rvalue[] arguments) |
ArrayAccessExpression(Location location,
Java.Rvalue lhs,
Java.Rvalue index) |
ArrayLength(Location location,
Java.Rvalue lhs) |
AssertStatement(Location location,
Java.Rvalue expression1,
Java.Rvalue optionalExpression2) |
Assignment(Location location,
Java.Lvalue lhs,
java.lang.String operator,
Java.Rvalue rhs) |
BinaryOperation(Location location,
Java.Rvalue lhs,
java.lang.String op,
Java.Rvalue rhs) |
Cast(Location location,
Java.Type targetType,
Java.Rvalue value) |
ConditionalExpression(Location location,
Java.Rvalue lhs,
Java.Rvalue mhs,
Java.Rvalue rhs) |
ConstructorInvocation(Location location,
Java.Rvalue[] arguments) |
DoStatement(Location location,
Java.BlockStatement body,
Java.Rvalue condition) |
ExpressionStatement(Java.Rvalue rvalue) |
ForEachStatement(Location location,
Java.FunctionDeclarator.FormalParameter currentElement,
Java.Rvalue expression,
Java.BlockStatement body) |
ForStatement(Location location,
Java.BlockStatement optionalInit,
Java.Rvalue optionalCondition,
Java.Rvalue[] optionalUpdate,
Java.BlockStatement body) |
ForStatement(Location location,
Java.BlockStatement optionalInit,
Java.Rvalue optionalCondition,
Java.Rvalue[] optionalUpdate,
Java.BlockStatement body) |
IfStatement(Location location,
Java.Rvalue condition,
Java.BlockStatement thenStatement,
Java.BlockStatement optionalElseStatement)
Notice that the
elseStatement is mandatory; for an if statement without
an "else" clause, a dummy Java.EmptyStatement should be passed. |
Instanceof(Location location,
Java.Rvalue lhs,
Java.Type rhs) |
Invocation(Location location,
java.lang.String methodName,
Java.Rvalue[] arguments) |
MethodInvocation(Location location,
Java.Atom optionalTarget,
java.lang.String methodName,
Java.Rvalue[] arguments) |
NewAnonymousClassInstance(Location location,
Java.Rvalue optionalQualification,
Java.AnonymousClassDeclaration anonymousClassDeclaration,
Java.Rvalue[] arguments) |
NewAnonymousClassInstance(Location location,
Java.Rvalue optionalQualification,
Java.AnonymousClassDeclaration anonymousClassDeclaration,
Java.Rvalue[] arguments) |
NewArray(Location location,
Java.Type type,
Java.Rvalue[] dimExprs,
int dims)
Create a new array with dimension dimExprs.length + dims
|
NewClassInstance(Location location,
Java.Rvalue optionalQualification,
IClass iClass,
Java.Rvalue[] arguments) |
NewClassInstance(Location location,
Java.Rvalue optionalQualification,
IClass iClass,
Java.Rvalue[] arguments) |
NewClassInstance(Location location,
Java.Rvalue optionalQualification,
Java.Type type,
Java.Rvalue[] arguments) |
NewClassInstance(Location location,
Java.Rvalue optionalQualification,
Java.Type type,
Java.Rvalue[] arguments) |
ParenthesizedExpression(Location location,
Java.Rvalue value) |
ReturnStatement(Location location,
Java.Rvalue optionalReturnValue) |
RvalueMemberType(Location location,
Java.Rvalue rvalue,
java.lang.String identifier)
Notice: The
rvalue is not a subordinate object! |
SuperclassMethodInvocation(Location location,
java.lang.String methodName,
Java.Rvalue[] arguments) |
SuperConstructorInvocation(Location location,
Java.Rvalue optionalQualification,
Java.Rvalue[] arguments) |
SuperConstructorInvocation(Location location,
Java.Rvalue optionalQualification,
Java.Rvalue[] arguments) |
SwitchStatement(Location location,
Java.Rvalue condition,
java.util.List<Java.SwitchStatement.SwitchBlockStatementGroup> sbsgs) |
SynchronizedStatement(Location location,
Java.Rvalue expression,
Java.BlockStatement body) |
ThrowStatement(Location location,
Java.Rvalue expression) |
UnaryOperation(Location location,
java.lang.String operator,
Java.Rvalue operand) |
WhileStatement(Location location,
Java.Rvalue condition,
Java.BlockStatement body) |
Constructor and Description |
---|
SwitchBlockStatementGroup(Location location,
java.util.List<Java.Rvalue> caseLabels,
boolean hasDefaultLabel,
java.util.List<Java.BlockStatement> blockStatements) |
Modifier and Type | Method and Description |
---|---|
void |
Traverser.traverseRvalue(Java.Rvalue rv) |