jreversepro.reflect.method
Class JBlockObject

java.lang.Object
  extended by jreversepro.reflect.method.JBlockObject
Direct Known Subclasses:
JCaseBlock, JCatchBlock, JDoWhileBlock, JElseBlock, JElseIfBlock, JFinallyBlock, JForBlock, JIfBlock, JMethodBlock, JSwitchBlock, JSynchBlock, JTryBlock

public abstract class JBlockObject
extends java.lang.Object

Author:
pazandak@objs.com -- Copyright 2002.

Field Summary
protected  java.lang.String indent
          Directed indentation
 
Constructor Summary
JBlockObject()
          Creates a new instance of BranchObject
 
Method Summary
 void addBlock(JBlockObject _jbo)
          Called to add a sub block
 void addStatement(JLineOfCode _loc)
          Called to add a line of code
protected  java.lang.String getEntryCode()
          Returns any starting code to open the block as a String
protected  JLineOfCode getEntryLineOfCode()
          Returns any starting code to open the block as a JLineOfCode
protected  java.lang.String getExitCode()
          Returns any terminating code to close the block as a String
protected  JLineOfCode getExitLineOfCode()
          Returns any terminating code to close the block as a JLineOfCode
 java.util.Vector getFlattenedCode(java.lang.String _indent)
          Outputs the method code contained in this block (and sub-blocks) as a vector of JLineOfCode objects
protected  boolean isSimpleBlock()
          Returns TRUE if block has only one stmt or block & does not need bracketing, otherwise returns FALSE.
 boolean removeLastBlock()
          Called to remove last block
 JLineOfCode removeLastStatement()
          Called to remove the last line of code added
 java.lang.String toString(java.lang.String _indent)
          Outputs the method code contained in this block (and sub-blocks) as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indent

protected java.lang.String indent
Directed indentation

Constructor Detail

JBlockObject

public JBlockObject()
Creates a new instance of BranchObject

Method Detail

isSimpleBlock

protected boolean isSimpleBlock()
Returns TRUE if block has only one stmt or block & does not need bracketing, otherwise returns FALSE.


addBlock

public void addBlock(JBlockObject _jbo)
Called to add a sub block


removeLastBlock

public boolean removeLastBlock()
Called to remove last block


addStatement

public void addStatement(JLineOfCode _loc)
Called to add a line of code


removeLastStatement

public JLineOfCode removeLastStatement()
Called to remove the last line of code added


getEntryCode

protected java.lang.String getEntryCode()
Returns any starting code to open the block as a String


getExitCode

protected java.lang.String getExitCode()
Returns any terminating code to close the block as a String


getEntryLineOfCode

protected JLineOfCode getEntryLineOfCode()
Returns any starting code to open the block as a JLineOfCode


getExitLineOfCode

protected JLineOfCode getExitLineOfCode()
Returns any terminating code to close the block as a JLineOfCode


toString

public java.lang.String toString(java.lang.String _indent)
Outputs the method code contained in this block (and sub-blocks) as a string


getFlattenedCode

public java.util.Vector getFlattenedCode(java.lang.String _indent)
Outputs the method code contained in this block (and sub-blocks) as a vector of JLineOfCode objects



Submit Feedback to akkumar@users.sourceforge.net