Class Java.Statement
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.Statement
- All Implemented Interfaces:
Java.BlockStatement, Java.Locatable, Java.Scope
- Direct Known Subclasses:
Java.AssertStatement, Java.Block, Java.BreakableStatement, Java.BreakStatement, Java.ContinueStatement, Java.EmptyStatement, Java.ExpressionStatement, Java.FieldDeclaration, Java.IfStatement, Java.LocalClassDeclarationStatement, Java.LocalVariableDeclarationStatement, Java.ReturnStatement, Java.SynchronizedStatement, Java.ThrowStatement, Java.TryStatement
- Enclosing class:
Java
Everything that can occur in the body of a method or in a block. Particularly, explicit constructor invocations
and initializers are not statements in this sense.
This class is misnamed; according to JLS7 8.8.7 and 14.2, its name should be "BlockStatement".
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Java.ScopeThe map of currently visible local variables.Fields inherited from class Java.Located
NOWHERE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindLocalVariable(String name) voidsetEnclosingScope(Java.Scope enclosingScope) Sets the enclosing scope of thisJava.BlockStatement.Methods inherited from class Java.Located
getLocation, throwCompileExceptionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Java.BlockStatement
acceptMethods inherited from interface Java.Locatable
getLocation, throwCompileException
-
Field Details
-
enclosingScope
-
localVariables
The map of currently visible local variables.
-
-
Constructor Details
-
Statement
-
-
Method Details
-
setEnclosingScope
Description copied from interface:Java.BlockStatementSets the enclosing scope of thisJava.BlockStatement.- Specified by:
setEnclosingScopein interfaceJava.BlockStatement
-
getEnclosingScope
- Specified by:
getEnclosingScopein interfaceJava.BlockStatement- Specified by:
getEnclosingScopein interfaceJava.Scope- Returns:
- The scope that encloses this scope, or
null
-
findLocalVariable
- Specified by:
findLocalVariablein interfaceJava.BlockStatement- Returns:
- The local variable with the given name
-