|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.bcp.PatternElement
public abstract class PatternElement
A PatternElement is an element of a ByteCodePattern. It potentially matches some number of bytecode instructions.
Constructor Summary | |
---|---|
PatternElement()
|
Method Summary | |
---|---|
abstract boolean |
acceptBranch(Edge edge,
org.apache.bcel.generic.InstructionHandle source)
Return whether or not it is acceptable to take the given branch. |
protected static BindingSet |
addOrCheckDefinition(java.lang.String varName,
Variable variable,
BindingSet bindingSet)
Add a variable definition to the given BindingSet, or if there is an existing definition, make sure it is consistent with the new definition. |
boolean |
allowTrailingEdges()
Return whether or not this PatternElement may match trailing edges. |
PatternElement |
dominatedBy(java.lang.String dominatedBy)
Set the label of another pattern element whose first matched instruction must dominate the instruction(s) matched by this element. |
java.lang.String |
getDominatedBy()
Get the label of the pattern element whose first matched instruction must dominate the instruction(s) matched by this element. |
java.lang.String |
getLabel()
Get the label of this PatternElement. |
PatternElement |
getNext()
Get the next PatternElement. |
PatternElement |
label(java.lang.String label)
Set a label for this PatternElement. |
static Variable |
lookup(java.lang.String varName,
BindingSet bindingSet)
Look up a variable definition in given BindingSet. |
abstract MatchResult |
match(org.apache.bcel.generic.InstructionHandle handle,
org.apache.bcel.generic.ConstantPoolGen cpg,
ValueNumberFrame before,
ValueNumberFrame after,
BindingSet bindingSet)
Return whether or not this element matches the given instruction with the given Bindings in effect. |
abstract int |
maxOccur()
Return the maximum number of instructions this PatternElement must match in the ByteCodePattern. |
abstract int |
minOccur()
Return the minimum number of instructions this PatternElement must match in the ByteCodePattern. |
PatternElement |
setAllowTrailingEdges(boolean allowTrailingEdges)
Set whether or not this PatternElement allows trailing edges to be matched. |
void |
setIndex(int index)
Set the index. |
void |
setNext(PatternElement patternElement)
Set the next PatternElement. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PatternElement()
Method Detail |
---|
public PatternElement getNext()
public void setNext(PatternElement patternElement)
public PatternElement label(java.lang.String label)
label
- the label
public java.lang.String getLabel()
public PatternElement dominatedBy(java.lang.String dominatedBy)
public java.lang.String getDominatedBy()
public void setIndex(int index)
public PatternElement setAllowTrailingEdges(boolean allowTrailingEdges)
allowTrailingEdges
- true if trailing edges may be matched,
false if trailing edges will never be matchedpublic boolean allowTrailingEdges()
public static Variable lookup(java.lang.String varName, BindingSet bindingSet)
varName
- the name of the variablebindingSet
- the BindingSet to look in
public abstract MatchResult match(org.apache.bcel.generic.InstructionHandle handle, org.apache.bcel.generic.ConstantPoolGen cpg, ValueNumberFrame before, ValueNumberFrame after, BindingSet bindingSet) throws DataflowAnalysisException
handle
- the instructioncpg
- the ConstantPoolGen from the methodbefore
- the ValueNumberFrame representing values in the Java stack frame
just before the execution of the instructionafter
- the ValueNumberFrame representing values in the Java stack frame
just after the execution of the instructionbindingSet
- the set of Bindings
DataflowAnalysisException
public abstract boolean acceptBranch(Edge edge, org.apache.bcel.generic.InstructionHandle source)
edge
- the Edge representing the branchsource
- the source instruction of the branch
public abstract int minOccur()
public abstract int maxOccur()
protected static BindingSet addOrCheckDefinition(java.lang.String varName, Variable variable, BindingSet bindingSet)
varName
- the name of the variablevariable
- the Variable which should be added or checked for consistencybindingSet
- the existing set of bindings
public java.lang.String toString()
toString
in class java.lang.Object
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |