net.sourceforge.pmd.lang.dfa
Class SequenceChecker

java.lang.Object
  extended by net.sourceforge.pmd.lang.dfa.SequenceChecker

public class SequenceChecker
extends Object

Author:
raik

Computes the first sequence in a list.

e.g. IF_START 0 WHILE_EXPR 1 WHILE_END 2 IF_END 3

The first sequence is WHILE_EXPR and WHILE_END. It returns always the first inner nested scope.


Constructor Summary
SequenceChecker(List<StackObject> bracesList)
           
 
Method Summary
 int getFirstIndex()
           
 int getLastIndex()
           
 boolean run()
          Finds the first innermost sequence e.g IFStart & IFEnd.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceChecker

public SequenceChecker(List<StackObject> bracesList)
Method Detail

run

public boolean run()
Finds the first innermost sequence e.g IFStart & IFEnd. If the list has been exhausted (firstIndex==lastIndex) the method returns true.


getFirstIndex

public int getFirstIndex()

getLastIndex

public int getLastIndex()


Copyright © 2002-2015 InfoEther. All Rights Reserved.