001    package railo.transformer.bytecode.statement.tag;
002    
003    import railo.transformer.bytecode.BytecodeContext;
004    import railo.transformer.bytecode.BytecodeException;
005    import railo.transformer.bytecode.Position;
006    import railo.transformer.bytecode.Statement;
007    import railo.transformer.bytecode.statement.FlowControl;
008    import railo.transformer.bytecode.statement.FlowControlFinal;
009    import railo.transformer.bytecode.util.ASMUtil;
010    
011    public final class TagBreak extends TagBase {
012            
013            private String label;
014    
015            public TagBreak(Position start,Position end) {
016                    super(start,end);
017                    setHasFlowController(true);
018            }
019    
020            /**
021             * @see railo.transformer.bytecode.statement.StatementBase#_writeOut(org.objectweb.asm.commons.GeneratorAdapter)
022             */
023            public void _writeOut(BytecodeContext bc) throws BytecodeException {
024                    
025                    
026                    ASMUtil.leadFlow(bc,this,FlowControl.BREAK,label);
027            }
028            
029            /**
030             *
031             * @see railo.transformer.bytecode.statement.StatementBase#setParent(railo.transformer.bytecode.Statement)
032             */
033            public void setParent(Statement parent) {
034                    super.setParent(parent);
035                    parent.setHasFlowController(true);
036            }
037            
038            @Override
039            public FlowControlFinal getFlowControlFinal() {
040                    return null;
041            }
042    
043            public void setLabel(String label) {
044                    this.label=label;
045            }
046    }