jreversepro.reflect
Class JLineOfCode

java.lang.Object
  extended by jreversepro.reflect.JLineOfCode

public class JLineOfCode
extends java.lang.Object

Represents a single line of code.

Author:
pazandak@objs.com - Copyright 2002.

Field Summary
static int ENTRY
          Entry of block
static int EXIT
          Exiting out of a block
static int INBLOCK
          Inside a block
 
Constructor Summary
JLineOfCode(int sbo, int ebo, int fromI, int toI, java.lang.String stmt)
          Creates a new instance of JLineOfCode
JLineOfCode(java.lang.String stmt, JBlockObject jbo, int state)
          Creates a new instance of JLineOfCode This JLineOfCode is either block entry or block exit code since no offsets are provided.
 
Method Summary
 JBlockObject getBlock()
           
 boolean isDecoration()
           
 boolean isEntryCode()
           
 boolean isExitCode()
           
 boolean isInBlockCode()
           
 void setBlock(JBlockObject jbo)
          Sets the LineOfCode's containing block
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String indent)
           
 java.lang.String toString(java.lang.String indent, boolean debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENTRY

public static final int ENTRY
Entry of block

See Also:
Constant Field Values

INBLOCK

public static final int INBLOCK
Inside a block

See Also:
Constant Field Values

EXIT

public static final int EXIT
Exiting out of a block

See Also:
Constant Field Values
Constructor Detail

JLineOfCode

public JLineOfCode(int sbo,
                   int ebo,
                   int fromI,
                   int toI,
                   java.lang.String stmt)
Creates a new instance of JLineOfCode

Parameters:
sbo - - start byte offset
ebo - - end byte offset
fromI - - from instruction # (index into instruction array)
toI - - to instruction #
stmt - - stringified line of code

JLineOfCode

public JLineOfCode(java.lang.String stmt,
                   JBlockObject jbo,
                   int state)
Creates a new instance of JLineOfCode This JLineOfCode is either block entry or block exit code since no offsets are provided.

Parameters:
stmt - Stringified line of code
jbo - the JBlockObject this line is associated with
state - ENTRY | EXIT
Method Detail

setBlock

public void setBlock(JBlockObject jbo)
Sets the LineOfCode's containing block

Parameters:
jbo - BlockObject

getBlock

public JBlockObject getBlock()
Returns:
Returns the LineOfCode's containing block

isEntryCode

public boolean isEntryCode()
Returns:
Returns TRUE if line is entry code, FALSE otherwise

isExitCode

public boolean isExitCode()
Returns:
Returns TRUE if line is exit code, FALSE otherwise

isInBlockCode

public boolean isInBlockCode()
Returns:
Returns TRUE if line is in block code, FALSE otherwise

isDecoration

public boolean isDecoration()
Returns:
Returns TRUE if line has not bytecode offsets, FALSE otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Outputs the stmt as a string

toString

public java.lang.String toString(java.lang.String indent)
Parameters:
indent - ???
Returns:
Outputs the stmt as a string, prefixed with _indent

toString

public java.lang.String toString(java.lang.String indent,
                                 boolean debug)
Parameters:
indent - ??
debug - Not Used - ???
Returns:
Outputs the stmt as a string, prefixed with _indent


Submit Feedback to akkumar@users.sourceforge.net