|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jode.flow.StructuredBlock
net.sf.jode.flow.TryBlock
public class TryBlock
A TryBlock is created for each exception in the
ExceptionHandlers attribute.
For each catch block (there may be more than one catch block
appending a single try block) and for each finally and each
synchronized block such a TryBlock is created. The
finally/synchronized-blocks have a null exception type so that they
are easily distinguishable from the catch blocks.
A TryBlock may be converted later into a SynchronizedBlock.
CatchBlock,
FinallyBlock,
SynchronizedBlock| Constructor Summary | |
|---|---|
TryBlock(FlowBlock tryFlow)
|
|
| Method Summary | |
|---|---|
void |
addCatchBlock(StructuredBlock catchBlock)
|
boolean |
checkJikesArrayClone()
A special transformation for try blocks: jikes generate try/catch-blocks for array clone: |
boolean |
doTransformations()
Do simple transformation on the structuredBlock. |
void |
dumpInstruction(TabbedPrintWriter writer)
Print the instruction expressing this structured block. |
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. |
VariableStack |
mapStackToLocal(VariableStack stack)
This does take the instr into account and modifies stack accordingly. |
boolean |
replaceSubBlock(StructuredBlock oldBlock,
StructuredBlock newBlock)
Replaces the given sub block with a new block. |
| Methods inherited from class net.sf.jode.flow.StructuredBlock |
|---|
appendBlock, checkConsistent, contains, copyJump, dumpSource, fillInGenSet, flowMayBeChanged, getBCELInstructions, getBytecodeInstructions, getDeclarables, getNextBlock, getNextBlock, getNextFlowBlock, getNextFlowBlock, isEmpty, isSingleExit, makeDeclaration, moveJump, needsBraces, prependBlock, propagateUsage, removeBlock, removeJump, removeOnetimeLocals, removePush, replace, setFlowBlock, setJump, setSuccessors, simplify, swapJump, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TryBlock(FlowBlock tryFlow)
| Method Detail |
|---|
public void addCatchBlock(StructuredBlock catchBlock)
public boolean replaceSubBlock(StructuredBlock oldBlock,
StructuredBlock newBlock)
replaceSubBlock in class StructuredBlockoldBlock - the old sub block.newBlock - the new sub block.
public StructuredBlock[] getSubBlocks()
getSubBlocks in class StructuredBlockpublic VariableStack mapStackToLocal(VariableStack stack)
mapStackToLocal in class StructuredBlockstack - the stack before the instruction is called
public void dumpInstruction(TabbedPrintWriter writer)
throws IOException
StructuredBlock
dumpInstruction in class StructuredBlockwriter - The tabbed print writer, where we print to.
IOExceptionpublic boolean jumpMayBeChanged()
jumpMayBeChanged in class StructuredBlockpublic boolean checkJikesArrayClone()
try {
PUSH ARRAY.clone()
} catch (CloneNotSupportedException ex) {
throw new InternalError(ex.getMessage());
}
which is simply transformed to the content of the try block.
public boolean doTransformations()
StructuredBlock
doTransformations in class StructuredBlock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||