Package org.codehaus.janino
Interface Java.BlockStatement
- All Superinterfaces:
Java.Locatable,Java.Scope
- All Known Subinterfaces:
Java.FieldDeclarationOrInitializer
- All Known Implementing Classes:
Java.AlternateConstructorInvocation,Java.AssertStatement,Java.Block,Java.BreakableStatement,Java.BreakStatement,Java.ConstructorInvocation,Java.ContinuableStatement,Java.ContinueStatement,Java.DoStatement,Java.EmptyStatement,Java.ExpressionStatement,Java.FieldDeclaration,Java.ForEachStatement,Java.ForStatement,Java.IfStatement,Java.Initializer,Java.LabeledStatement,Java.LocalClassDeclarationStatement,Java.LocalVariableDeclarationStatement,Java.ReturnStatement,Java.Statement,Java.SuperConstructorInvocation,Java.SwitchStatement,Java.SynchronizedStatement,Java.ThrowStatement,Java.TryStatement,Java.WhileStatement
- Enclosing class:
Java
Everything that can be compiled to code, e.g. the statements occurring in the body of a method or in a block,
explicit constructor invocations and instance/static initializers.
-
Method Summary
Modifier and TypeMethodDescription<R,EX extends Throwable>
Raccept(Visitor.BlockStatementVisitor<R, EX> visitor) Invokes the "visit...()" method ofVisitor.BlockStatementVisitorfor the concreteJava.BlockStatementtype.findLocalVariable(String name) voidsetEnclosingScope(Java.Scope enclosingScope) Sets the enclosing scope of thisJava.BlockStatement.Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
-
Method Details
-
setEnclosingScope
Sets the enclosing scope of thisJava.BlockStatement. -
getEnclosingScope
Java.Scope getEnclosingScope()- Specified by:
getEnclosingScopein interfaceJava.Scope- Returns:
- The scope that encloses this scope, or
null
-
accept
Invokes the "visit...()" method ofVisitor.BlockStatementVisitorfor the concreteJava.BlockStatementtype.- Throws:
EX
-
findLocalVariable
- Returns:
- The local variable with the given name
-