1 19 20 package jode.flow; 21 22 26 public class FinallyBlock extends StructuredBlock { 27 30 StructuredBlock subBlock; 31 32 public FinallyBlock() { 33 } 34 35 39 public void setCatchBlock(StructuredBlock subBlock) { 40 this.subBlock = subBlock; 41 subBlock.outer = this; 42 subBlock.setFlowBlock(flowBlock); 43 } 44 45 47 48 54 public boolean replaceSubBlock(StructuredBlock oldBlock, 55 StructuredBlock newBlock) { 56 if (subBlock == oldBlock) 57 subBlock = newBlock; 58 else 59 return false; 60 return true; 61 } 62 63 66 public StructuredBlock[] getSubBlocks() { 67 return new StructuredBlock[] { subBlock }; 68 } 69 70 77 public VariableStack mapStackToLocal(VariableStack stack) { 78 super.mapStackToLocal(stack); 79 return null; 80 } 81 82 91 public StructuredBlock getNextBlock(StructuredBlock subBlock) { 92 return null; 93 } 94 95 public FlowBlock getNextFlowBlock(StructuredBlock subBlock) { 96 return null; 97 } 98 99 public void dumpInstruction(jode.decompiler.TabbedPrintWriter writer) 100 throws java.io.IOException { 101 writer.closeBraceContinue(); 102 writer.print("finally"); 103 writer.openBrace(); 104 writer.tab(); 105 subBlock.dumpSource(writer); 106 writer.untab(); 107 } 108 } 109 | Popular Tags |