com.togethersoft.sca.dataflow.flowgraph
Interface IJavaLoop


public interface IJavaLoop

interface for Object representing Java loop


Method Summary
 void check()
          Set this for this loop and for it`s subloops the attributes indicating whether these loops are forever loops or zero iteration loops.
 boolean entryIsReachable()
           
 boolean isExecuteOnceLoop()
          shows if this loop was found by dataflow analysis to be execute once loop.
 boolean isForeverLoop()
          shows if this loop was found by dataflow analysis to be forever loop.
 boolean isZeroIterationsLoop()
          shows if this loop was found by dataflow analysis to be zero iterations loop.
 void print(java.io.PrintStream out)
          Prints debugging info
 AstStatement stmt()
          Return the AST node for loop represented by this object.
 IJavaLoop[] subLoops()
          Obtain array of loops immediately nested in this loop.
 

Method Detail

check

public void check()
Set this for this loop and for it`s subloops the attributes indicating whether these loops are forever loops or zero iteration loops. The method assumes that dataflow analysis is performed.

entryIsReachable

public boolean entryIsReachable()
Returns:
true if loop entry is reachable

isExecuteOnceLoop

public boolean isExecuteOnceLoop()
shows if this loop was found by dataflow analysis to be execute once loop. (I.e. condition of the do while loop is always false) This information is calculated by method check

isForeverLoop

public boolean isForeverLoop()
shows if this loop was found by dataflow analysis to be forever loop. This information is calculated by method check

isZeroIterationsLoop

public boolean isZeroIterationsLoop()
shows if this loop was found by dataflow analysis to be zero iterations loop. (I.e. body of the loop is never executed) This information is calculated by method check

print

public void print(java.io.PrintStream out)
Prints debugging info
Parameters:
out - stream on which to print the information

stmt

public AstStatement stmt()
Return the AST node for loop represented by this object.

subLoops

public IJavaLoop[] subLoops()
Obtain array of loops immediately nested in this loop. Returns null if no such loop exist.