|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.bcp.PatternMatcher.State
private class PatternMatcher.State
Object representing the current state of the matching algorithm. Provides convenient methods to implement the various steps of the algorithm.
Field Summary | |
---|---|
private BasicBlock |
basicBlock
|
private BindingSet |
bindingSet
|
private boolean |
canFork
|
private PatternElementMatch |
currentMatch
|
private BasicBlock.InstructionIterator |
instructionIterator
|
private int |
matchCount
|
private PatternElement |
patternElement
|
Constructor Summary | |
---|---|
PatternMatcher.State(BasicBlock basicBlock,
BasicBlock.InstructionIterator instructionIterator,
PatternElement patternElement)
Constructor. |
|
PatternMatcher.State(BasicBlock basicBlock,
BasicBlock.InstructionIterator instructionIterator,
PatternElement patternElement,
int matchCount,
PatternElementMatch currentMatch,
BindingSet bindingSet,
boolean canFork)
Constructor. |
Method Summary | |
---|---|
PatternMatcher.State |
advanceToNextElement()
Try to produce a new state that will finish matching the current element and start matching the next element. |
PatternMatcher.State |
advanceToSuccessor(Edge edge,
MatchResult matchResult)
Return a new State for continuing the overall pattern match in a successor basic block. |
boolean |
canAdvanceToNextBasicBlock()
Determine if it is possible to continue matching in a successor basic block. |
boolean |
currentElementCanContinue()
Determine if the current pattern element can continue to match instructions. |
java.util.Iterator<PatternMatcher.State> |
dominatedInstructionStateIterator()
Return Iterator over states representing dominated instructions that continue the match. |
PatternMatcher.State |
duplicate()
Make an exact copy of this object. |
BasicBlock |
getBasicBlock()
Get basic block. |
PatternElementMatch |
getCurrentMatch()
Get current pattern element match. |
org.apache.bcel.generic.InstructionHandle |
getLastMatchedInstruction()
Get most recently matched instruction. |
PatternElement |
getPatternElement()
Get current pattern element. |
ByteCodePatternMatch |
getResult()
Get a ByteCodePatternMatch representing the complete match. |
boolean |
isComplete()
Determine if the match is complete. |
boolean |
lookForDominatedInstruction()
Determine if we need to look for a dominated instruction at this point in the search. |
private MatchResult |
matchLocation(Location location)
|
MatchResult |
matchNextInBasicBlock()
Match current pattern element with next instruction in basic block. |
boolean |
moreInstructionsInBasicBlock()
Determine if there are more instructions in the same basic block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private BasicBlock basicBlock
private BasicBlock.InstructionIterator instructionIterator
private PatternElement patternElement
private int matchCount
private PatternElementMatch currentMatch
private BindingSet bindingSet
private boolean canFork
Constructor Detail |
---|
public PatternMatcher.State(BasicBlock basicBlock, BasicBlock.InstructionIterator instructionIterator, PatternElement patternElement)
basicBlock
- the initial basic blockinstructionIterator
- the instructionIterator indicating where
to start matchingpatternElement
- the first PatternElement of the patternpublic PatternMatcher.State(BasicBlock basicBlock, BasicBlock.InstructionIterator instructionIterator, PatternElement patternElement, int matchCount, PatternElementMatch currentMatch, BindingSet bindingSet, boolean canFork)
Method Detail |
---|
public PatternMatcher.State duplicate()
public BasicBlock getBasicBlock()
public PatternElement getPatternElement()
public PatternElementMatch getCurrentMatch()
public boolean isComplete()
public ByteCodePatternMatch getResult()
public PatternMatcher.State advanceToNextElement()
public boolean currentElementCanContinue()
public boolean moreInstructionsInBasicBlock()
public MatchResult matchNextInBasicBlock() throws DataflowAnalysisException
DataflowAnalysisException
public boolean canAdvanceToNextBasicBlock()
public org.apache.bcel.generic.InstructionHandle getLastMatchedInstruction()
public PatternMatcher.State advanceToSuccessor(Edge edge, MatchResult matchResult)
edge
- the Edge leading to the successor basic blockmatchResult
- a MatchResult representing the match of the
last instruction in the predecessor block; null if nonepublic boolean lookForDominatedInstruction()
public java.util.Iterator<PatternMatcher.State> dominatedInstructionStateIterator() throws DataflowAnalysisException
DataflowAnalysisException
private MatchResult matchLocation(Location location) throws DataflowAnalysisException
DataflowAnalysisException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |