org.codehaus.janino
Class Java.Initializer
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.AbstractTypeBodyDeclaration
org.codehaus.janino.Java.Initializer
- All Implemented Interfaces:
- Java.BlockStatement, Java.Locatable, Java.Scope, Java.TypeBodyDeclaration
- Enclosing class:
- Java
public static final class Java.Initializer
- extends Java.AbstractTypeBodyDeclaration
- implements Java.BlockStatement
Representation of an 'instance initializer' (JLS7 8.6) or 'static initializer' (JLS7 8.7).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
block
public final Java.Block block
- The block that poses the initializer.
Java.Initializer
public Java.Initializer(Location location,
boolean statiC,
Java.Block block)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
accept
public void accept(Visitor.TypeBodyDeclarationVisitor visitor)
- Description copied from interface:
Java.TypeBodyDeclaration
- Invokes the '
visit...()' method of Visitor.TypeBodyDeclarationVisitor for the concrete
Java.TypeBodyDeclaration type.
- Specified by:
accept in interface Java.TypeBodyDeclaration
accept
public void accept(Visitor.BlockStatementVisitor visitor)
- Description copied from interface:
Java.BlockStatement
- Invokes the '
visit...()' method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type.
- Specified by:
accept in interface Java.BlockStatement
findLocalVariable
public Java.LocalVariable findLocalVariable(java.lang.String name)
- Specified by:
findLocalVariable in interface Java.BlockStatement
- Returns:
- The local variable with the given
name