FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba.bcp
Class PatternElementMatch

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.bcp.PatternElementMatch

public class PatternElementMatch
extends java.lang.Object

PatternElementMatch represents matching a PatternElement against a single instruction. The "prev" field points to the previous PatternElementMatch. By building up sequences of PatternElementMatch objects in this way, we can implement nondeterministic matching without having to copy anything.


Constructor Summary
PatternElementMatch(PatternElement patternElement, org.apache.bcel.generic.InstructionHandle matchedInstruction, BasicBlock basicBlock, int matchCount, PatternElementMatch prev)
          Constructor.
 
Method Summary
 boolean allowTrailingEdges()
          Return whether or not the most recently matched instruction allows trailing edges.
 boolean equals(java.lang.Object o)
           
 BasicBlock getBasicBlock()
          Get the basic block containing the matched instruction.
 PatternElementMatch getFirstLabeledMatch(java.lang.String label)
          Get first match element with given label, if any.
 org.apache.bcel.generic.InstructionHandle getLabeledInstruction(java.lang.String label)
          Get the first instruction matched by the PatternElement with given label.
 PatternElementMatch getLastLabeledMatch(java.lang.String label)
          Get last match element with given label, if any.
 int getMatchCount()
           
 org.apache.bcel.generic.InstructionHandle getMatchedInstructionInstructionHandle()
          Get the matched instruction.
 PatternElement getPatternElement()
          Get the PatternElement.
 PatternElementMatch getPrev()
          Get the previous PatternMatchElement.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternElementMatch

public PatternElementMatch(PatternElement patternElement,
                           org.apache.bcel.generic.InstructionHandle matchedInstruction,
                           BasicBlock basicBlock,
                           int matchCount,
                           PatternElementMatch prev)
Constructor.

Parameters:
patternElement - the PatternElement being matched
matchedInstruction - the instruction which matched the PatternElement
basicBlock - the basic block containing the matched instruction
matchCount - the index (starting at zero) of the instructions matching the PatternElement; multiple instructions can match the same PatternElement
prev - the previous PatternElementMatch
Method Detail

getPatternElement

public PatternElement getPatternElement()
Get the PatternElement.


getMatchedInstructionInstructionHandle

public org.apache.bcel.generic.InstructionHandle getMatchedInstructionInstructionHandle()
Get the matched instruction.


getBasicBlock

public BasicBlock getBasicBlock()
Get the basic block containing the matched instruction.


getMatchCount

public int getMatchCount()

getPrev

public PatternElementMatch getPrev()
Get the previous PatternMatchElement.


getLabeledInstruction

public org.apache.bcel.generic.InstructionHandle getLabeledInstruction(java.lang.String label)
Get the first instruction matched by the PatternElement with given label.


getFirstLabeledMatch

public PatternElementMatch getFirstLabeledMatch(java.lang.String label)
Get first match element with given label, if any.


getLastLabeledMatch

public PatternElementMatch getLastLabeledMatch(java.lang.String label)
Get last match element with given label, if any.


allowTrailingEdges

public boolean allowTrailingEdges()
Return whether or not the most recently matched instruction allows trailing edges.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.