net.janino
Class Java.BreakableStatement

java.lang.Object
  |
  +--net.janino.Java.Located
        |
        +--net.janino.Java.BlockStatement
              |
              +--net.janino.Java.Statement
                    |
                    +--net.janino.Java.BreakableStatement
All Implemented Interfaces:
Java.Locatable, Java.Scope
Direct Known Subclasses:
Java.ContinuableStatement, Java.LabeledStatement, Java.SwitchStatement
Enclosing class:
Java

public abstract static class Java.BreakableStatement
extends Java.Statement

Base class for statements that can be terminated abnormally with a "break" statement.

According to the JLS, statements that can be terminated abnormally with a "break" statement are: "COntinuable" statements ("for", "do" and "while"), labeled statements, and the "switch" statement.


Fields inherited from class net.janino.Java.Statement
enclosingScope
 
Constructor Summary
Java.BreakableStatement(Scanner.Location location, Java.Scope enclosingScope)
           
 
Method Summary
 boolean compile()
           
abstract  boolean compile2()
           
 ClassFile.CodeAttribute.Offset getWhereToBreak()
           
 
Methods inherited from class net.janino.Java.Statement
generatesCode, getEnclosingScope, leave
 
Methods inherited from class net.janino.Java.BlockStatement
addConstantFloatInfo, addConstantIntegerInfo, addConstantStringInfo, allocateLocalVariable, compileError, createDummyCodeAttribute, getLocation, newInserter, newOffset, newUnsetOffset, popInserter, pushInserter, restoreLocalVariables, saveLocalVariables, throwParseException, write, writeBranch, writeByte, writeConstantClassInfo, writeConstantDoubleInfo, writeConstantFieldrefInfo, writeConstantFloatInfo, writeConstantIntegerInfo, writeConstantInterfaceMethodrefInfo, writeConstantLongInfo, writeConstantMethodrefInfo, writeConstantStringInfo, writeInt, writeOffset, writeOpcode, writeShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java.BreakableStatement

public Java.BreakableStatement(Scanner.Location location,
                               Java.Scope enclosingScope)
Method Detail

compile

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

compile2

public abstract boolean compile2()
                          throws Java.CompileException

getWhereToBreak

public ClassFile.CodeAttribute.Offset getWhereToBreak()