Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.flow
Class SynchronizedBlock

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

public class SynchronizedBlock
extends StructuredBlock

This class represents a synchronized structured block.

Author:
Jochen Hoenicke

Constructor Summary
SynchronizedBlock(LocalInfo local)
           
 
Method Summary
 boolean doTransformations()
          Do simple transformation on the structuredBlock.
 void dumpInstruction(TabbedPrintWriter writer)
          Print the instruction expressing this structured block.
 java.util.Set getDeclarables()
           
 StructuredBlock[] getSubBlocks()
          Returns all sub block of this structured block.
 boolean jumpMayBeChanged()
          Determines if there is a sub block, that flows through to the end of this block.
 boolean replaceSubBlock(StructuredBlock oldBlock, StructuredBlock newBlock)
          Replaces the given sub block with a new block.
 void setBodyBlock(StructuredBlock body)
          Sets the body block.
 void simplify()
           
 
Methods inherited from class net.sf.jode.flow.StructuredBlock
appendBlock, checkConsistent, contains, copyJump, dumpSource, fillInGenSet, flowMayBeChanged, getNextBlock, getNextBlock, getNextFlowBlock, getNextFlowBlock, isEmpty, isSingleExit, makeDeclaration, mapStackToLocal, moveJump, needsBraces, prependBlock, propagateUsage, removeBlock, removeJump, removeOnetimeLocals, removePush, replace, setFlowBlock, setJump, setSuccessors, swapJump, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizedBlock

public SynchronizedBlock(LocalInfo local)
Method Detail

setBodyBlock

public void setBodyBlock(StructuredBlock body)
Sets the body block.


getSubBlocks

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

Overrides:
getSubBlocks 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.

getDeclarables

public java.util.Set getDeclarables()
Overrides:
getDeclarables 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

simplify

public void simplify()
Overrides:
simplify in class StructuredBlock

jumpMayBeChanged

public boolean jumpMayBeChanged()
Determines if there is a sub block, that flows through to the end of this block. If this returns true, you know that jump is null.

Overrides:
jumpMayBeChanged in class StructuredBlock
Returns:
true, if the jump may be safely changed.

doTransformations

public boolean doTransformations()
Description copied from class: StructuredBlock
Do simple transformation on the structuredBlock.

Overrides:
doTransformations in class StructuredBlock
Returns:
true, if some transformation was done.

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.