net.janino
Class Java.SynchronizedStatement

java.lang.Object
  |
  +--net.janino.Java.Statement
        |
        +--net.janino.Java.SynchronizedStatement
All Implemented Interfaces:
Java.BlockStatement, Java.Locatable, Java.Scope
Enclosing class:
Java

public static class Java.SynchronizedStatement
extends Java.Statement


Fields inherited from class net.janino.Java.Statement
enclosingScope
 
Constructor Summary
Java.SynchronizedStatement(Scanner.Location location, Java.Scope enclosingScope, Java.Rvalue expression)
           
 
Method Summary
 boolean compile(ClassFile.CodeAttribute codeAttribute)
           
 void leave(ClassFile.CodeAttribute codeAttribute)
          Clean up the statement context.
 void setBody(Java.BlockStatement body)
           
 
Methods inherited from class net.janino.Java.Statement
getEnclosingScope, getLocation, throwCompileException, throwParseException
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java.SynchronizedStatement

public Java.SynchronizedStatement(Scanner.Location location,
                                  Java.Scope enclosingScope,
                                  Java.Rvalue expression)
Method Detail

setBody

public void setBody(Java.BlockStatement body)

compile

public boolean compile(ClassFile.CodeAttribute codeAttribute)
                throws Java.CompileException
Overrides:
compile in class Java.Statement
Following copied from interface: net.janino.Java.BlockStatement
Returns:
false if this statement cannot complete normally (14.20)

leave

public void leave(ClassFile.CodeAttribute codeAttribute)
Description copied from interface: Java.BlockStatement
Clean up the statement context. This is currently relevant for "try ... catch ... finally" statements (execute "finally" clause) and "synchronized" statements (monitorexit).

Statements like "return", "break", "continue" must call this method for all the statements they terminate.

Notice: The code generated by this method must not modify the operand stack, i.e. if the code needs any state information, then that information must be passed to it in unnamed local variables.

Overrides:
leave in class Java.Statement