Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.flow
Class JsrBlock

java.lang.Object
  extended bynet.sf.jode.flow.StructuredBlock
      extended bynet.sf.jode.flow.JsrBlock

public class JsrBlock
extends StructuredBlock

This block represents a jsr instruction. A jsr instruction is used to call the finally block, or to call the monitorexit block in a synchronized block.

Author:
Jochen Hoenicke

Constructor Summary
JsrBlock()
           
 
Method Summary
 void dumpInstruction(TabbedPrintWriter writer)
          Print the instruction expressing this structured block.
 StructuredBlock[] getSubBlocks()
          Returns all sub block of this structured block.
 boolean isGood()
           
 VariableStack mapStackToLocal(VariableStack stack)
          This is called after the analysis is completely done.
 boolean replaceSubBlock(StructuredBlock oldBlock, StructuredBlock newBlock)
          Replaces the given sub block with a new block.
 void setGood(boolean g)
           
 void setSuccessors(Jump[] jumps)
          Sets the successors of this structured block.
 
Methods inherited from class net.sf.jode.flow.StructuredBlock
appendBlock, checkConsistent, contains, copyJump, doTransformations, dumpSource, fillInGenSet, flowMayBeChanged, getDeclarables, getNextBlock, getNextBlock, getNextFlowBlock, getNextFlowBlock, isEmpty, isSingleExit, jumpMayBeChanged, makeDeclaration, moveJump, needsBraces, prependBlock, propagateUsage, removeBlock, removeJump, removeOnetimeLocals, removePush, replace, setFlowBlock, setJump, simplify, swapJump, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsrBlock

public JsrBlock()
Method Detail

setGood

public void setGood(boolean g)

isGood

public boolean isGood()

setSuccessors

public void setSuccessors(Jump[] jumps)
Sets the successors of this structured block. This should be only called once, by FlowBlock.setSuccessors().

Overrides:
setSuccessors in class StructuredBlock

replaceSubBlock

public boolean replaceSubBlock(StructuredBlock oldBlock,
                               StructuredBlock newBlock)
Replaces the given sub block with a new block.

Overrides:
replaceSubBlock in class StructuredBlock
Parameters:
oldBlock - the old sub block.
newBlock - the new sub block.
Returns:
false, if oldBlock wasn't a direct sub block.

mapStackToLocal

public VariableStack mapStackToLocal(VariableStack stack)
This is called after the analysis is completely done. It will remove all PUSH/stack_i expressions, (if the bytecode is correct).

The default implementation merges the stack after each sub block. This may not be, what you want.

Overrides:
mapStackToLocal in class StructuredBlock
Returns:
the stack after the block has executed.

getSubBlocks

public StructuredBlock[] getSubBlocks()
Returns all sub block of this structured block.

Overrides:
getSubBlocks in class StructuredBlock

dumpInstruction

public void dumpInstruction(TabbedPrintWriter writer)
                     throws java.io.IOException
Description copied from class: StructuredBlock
Print the instruction expressing this structured block.

Specified by:
dumpInstruction in class StructuredBlock
Parameters:
writer - The tabbed print writer, where we print to.
Throws:
java.io.IOException

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.