net.sourceforge.pmd.dfa

Class 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 und WHILE_END. It returns always the first inner nested scope.

Constructor Summary
SequenceChecker(List bracesList)
Method Summary
intgetFirstIndex()
intgetLastIndex()
booleanrun()
Finds the first most inner sequence e.g IFStart & IFEnd.

Constructor Detail

SequenceChecker

public SequenceChecker(List bracesList)

Method Detail

getFirstIndex

public int getFirstIndex()

getLastIndex

public int getLastIndex()

run

public boolean run()
Finds the first most inner sequence e.g IFStart & IFEnd. If no sequence is found or the list is empty the method returns false.