From 8fab80629c26790127958c0a19036a975294d27b Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 7 Feb 1999 19:33:16 +0000 Subject: [PATCH] new empty constructor git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@201 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/flow/ConditionalBlock.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/jode/jode/flow/ConditionalBlock.java b/jode/jode/flow/ConditionalBlock.java index 6fe7107..f6a28f0 100644 --- a/jode/jode/flow/ConditionalBlock.java +++ b/jode/jode/flow/ConditionalBlock.java @@ -29,8 +29,7 @@ public class ConditionalBlock extends InstructionContainer { EmptyBlock trueBlock; /** - * Creates a new if then else block. The method setThenBlock must - * be called shortly after the creation. + * Creates a new if conditional block. */ public ConditionalBlock(Expression cond, Jump condJump, Jump elseJump) { super(cond, elseJump); @@ -41,6 +40,18 @@ public class ConditionalBlock extends InstructionContainer { trueBlock.outer = this; } + /** + * Creates a new if conditional block. + */ + public ConditionalBlock(Expression cond) { + super(cond); + /* cond is a CompareBinary or CompareUnary operator, so no + * check for LocalVarOperator (for condJump) is needed here. + */ + trueBlock = new EmptyBlock(); + trueBlock.outer = this; + } + /* The implementation of getNext[Flow]Block is the standard * implementation */ @@ -64,9 +75,7 @@ public class ConditionalBlock extends InstructionContainer { } /** - * Print the source code for this structured block. This may be - * called only once, because it remembers which local variables - * were declared. + * Print the source code for this structured block. */ public void dumpInstruction(TabbedPrintWriter writer) throws java.io.IOException