Package | Description |
---|---|
org.codehaus.janino |
The classes in this package pose the core of the Janino JavaTM compiler.
|
Modifier and Type | Class and Description |
---|---|
static class |
Java.AlternateConstructorInvocation
Representation of a JLS7 8.8.7.1.
|
static class |
Java.AssertStatement
Representation of the JLS7 14.10 ASSERT statement.
|
static class |
Java.Block
Representation of a Java™ "block" (JLS7 14.2).
|
static class |
Java.BreakableStatement
Base class for statements that can be terminated abnormally with a "break" statement.
|
static class |
Java.BreakStatement
Representation of the JLS7 14.15 BREAK statement.
|
static class |
Java.ConstructorInvocation
Abstract bas class for
Java.SuperConstructorInvocation and Java.AlternateConstructorInvocation . |
static class |
Java.ContinuableStatement
Base class for statements that support the 'continue' statement.
|
static class |
Java.ContinueStatement
Representation of the JLS7 14.16 CONTINUE statement.
|
static class |
Java.DoStatement
Representation of a JLS7 14.13 DO statement.
|
static class |
Java.EmptyStatement
Representation of the "empty statement", i.e.
|
static class |
Java.ExpressionStatement
Representation of the JLS7 14.8 'expression statement'.
|
static class |
Java.FieldDeclaration
This class is derived from "Statement", because it provides for the
initialization of the field.
|
static class |
Java.ForEachStatement
Representation of a JLS7 14.14.2 'enhanced FOR statement'.
|
static class |
Java.ForStatement
Representation of a JLS7 14.14.1 'basic FOR statement'.
|
static class |
Java.IfStatement
Representation of a JLS7 14.9 IF statement.
|
static class |
Java.Initializer
Representation of an 'instance initializer' (JLS7 8.6) or 'static initializer' (JLS7 8.7).
|
static class |
Java.LabeledStatement
Representation of a JLS7 14.7 'labeled statement'.
|
static class |
Java.LocalClassDeclarationStatement
Representation of the JLS7 14.3 'local class declaration statement'.
|
static class |
Java.LocalVariableDeclarationStatement
Representation of a JLS7 14.4 'local variable declaration statement'.
|
static class |
Java.ReturnStatement
Representation of the JLS7 14.17 RETURN statement.
|
static class |
Java.Statement
Everything that can occur in the body of a method or in a block.
|
static class |
Java.SuperConstructorInvocation
Representation of a JLS7 8.8.7.1.
|
static class |
Java.SwitchStatement
The JLS7 14.10 "switch" Statement.
|
static class |
Java.SynchronizedStatement
Representation of a JLS7 14.9 SYNCHRONIZED statement.
|
static class |
Java.ThrowStatement
Representation of a JLS7 14.18 THROW statement.
|
static class |
Java.TryStatement
Representation of a JLS7 14.20 TRY statement.
|
static class |
Java.WhileStatement
Representation of the JLS7 14.2 WHILE statement.
|
Modifier and Type | Field and Description |
---|---|
Java.BlockStatement |
Java.ContinuableStatement.body
The body of this continuable statement.
|
Java.BlockStatement |
Java.TryStatement.body
The body of the TRY statement.
|
Java.BlockStatement |
Java.SynchronizedStatement.body
The body of this SYNCHRONIZED statement.
|
private Java.BlockStatement |
Java.Rvalue.enclosingBlockStatement |
Java.BlockStatement |
Java.IfStatement.optionalElseStatement
The optional ELSE statement, which is executed iff the condition evaluates to FALSE.
|
Java.BlockStatement |
Java.ForStatement.optionalInit
The optional 'init' part of the 'basic FOR statement'.
|
Java.BlockStatement |
Java.IfStatement.thenStatement
The 'then statement', which is executed iff the condition evaluates to TRUE.
|
Modifier and Type | Field and Description |
---|---|
java.util.List<Java.BlockStatement> |
Java.SwitchStatement.SwitchBlockStatementGroup.blockStatements
The statements following the CASE labels.
|
java.util.List<? extends Java.BlockStatement> |
Java.FunctionDeclarator.optionalStatements
The statements that comprise the function;
null for abstract method declarations. |
java.util.List<Java.BlockStatement> |
Java.Block.statements
The list of statements that comprise the body of the block.
|
java.util.List<Java.BlockStatement> |
Java.ClassDeclaration.variableDeclaratorsAndInitializers
List of
Java.TypeBodyDeclaration s of this class: Field declarations (both static and non-static),
(static and non-static) initializers (a.k.a. |
Modifier and Type | Method and Description |
---|---|
Java.BlockStatement |
Java.Rvalue.getEnclosingBlockStatement() |
Java.BlockStatement[] |
Java.Block.getStatements() |
Java.BlockStatement |
Parser.parseBlockStatement()
BlockStatement := { Identifier ':' } (
( Modifiers Type | ModifiersOpt BasicType ) VariableDeclarators ';' |
'class' ...
|
Modifier and Type | Method and Description |
---|---|
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) |
java.util.List<Java.BlockStatement> |
Parser.parseBlockStatements()
BlockStatements := { BlockStatement }
|
Modifier and Type | Method and Description |
---|---|
void |
Java.Block.addStatement(Java.BlockStatement statement)
Adds one statement to the end of the block.
|
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 . |
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 boolean |
UnitCompiler.compile(Java.BlockStatement bs) |
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 boolean |
UnitCompiler.fakeCompile(Java.BlockStatement bs)
Called to check whether the given
Java.Rvalue compiles or not. |
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.BlockStatement bs) |
private void |
UnitCompiler.leave(Java.BlockStatement bs,
IClass optionalStackValueType)
Clean up the statement context.
|
private void |
UnitCompiler.leave2(Java.BlockStatement bs,
IClass optionalStackValueType) |
private static void |
Java.setEnclosingBlockStatement(Java.ArrayInitializerOrRvalue aiorv,
Java.BlockStatement enclosingBlockStatement) |
void |
Java.Rvalue.setEnclosingBlockStatement(Java.BlockStatement enclosingBlockStatement)
Sets enclosing block statement for this object and all subordinate
Java.Rvalue objects. |
private void |
UnparseVisitor.unparseBlockStatement(Java.BlockStatement blockStatement) |
Modifier and Type | Method and Description |
---|---|
void |
Java.Block.addStatements(java.util.List<Java.BlockStatement> statements)
Adds a list of statements to the end of the block.
|
private boolean |
UnitCompiler.compileStatements(java.util.List<? extends Java.BlockStatement> statements) |
private boolean |
UnitCompiler.generatesCode2(java.util.List<Java.BlockStatement> l) |
protected Java.MethodDeclarator |
ScriptEvaluator.makeMethodDeclaration(Location location,
Java.Annotation[] annotations,
boolean staticMethod,
java.lang.Class returnType,
java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.String[] parameterNames,
java.lang.Class[] thrownExceptions,
java.util.List<Java.BlockStatement> statements)
To the given
Java.ClassDeclaration , add
A public method declaration with the given return type, name, parameter
names and values and thrown exceptions
A block
|
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 void |
UnparseVisitor.unparseStatements(java.util.List<? extends Java.BlockStatement> statements) |
Constructor and Description |
---|
ConstructorDeclarator(Location location,
java.lang.String optionalDocComment,
Java.Modifiers modifiers,
Java.FunctionDeclarator.FormalParameters parameters,
Java.Type[] thrownExceptions,
Java.ConstructorInvocation optionalConstructorInvocation,
java.util.List<Java.BlockStatement> statements) |
FunctionDeclarator(Location location,
java.lang.String optionalDocComment,
Java.Modifiers modifiers,
Java.Type type,
java.lang.String name,
Java.FunctionDeclarator.FormalParameters parameters,
Java.Type[] thrownExceptions,
java.util.List<? extends Java.BlockStatement> optionalStatements) |
MethodDeclarator(Location location,
java.lang.String optionalDocComment,
Java.Modifiers modifiers,
Java.Type type,
java.lang.String name,
Java.FunctionDeclarator.FormalParameters parameters,
Java.Type[] thrownExceptions,
java.util.List<? extends Java.BlockStatement> optionalStatements) |
SwitchBlockStatementGroup(Location location,
java.util.List<Java.Rvalue> caseLabels,
boolean hasDefaultLabel,
java.util.List<Java.BlockStatement> blockStatements) |