Package edu.umd.cs.findbugs.ba.bcp
Class OneVariableInstruction
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.bcp.PatternElement
-
- edu.umd.cs.findbugs.ba.bcp.SingleInstruction
-
- edu.umd.cs.findbugs.ba.bcp.OneVariableInstruction
-
- Direct Known Subclasses:
IfNull
,Monitorenter
,New
public abstract class OneVariableInstruction extends SingleInstruction
Abstract PatternElement subclass for matching single instructions which have a single Variable.- See Also:
PatternElement
-
-
Constructor Summary
Constructors Constructor Description OneVariableInstruction(java.lang.String varName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MatchResult
addOrCheckDefinition(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.-
Methods inherited from class edu.umd.cs.findbugs.ba.bcp.SingleInstruction
acceptBranch, maxOccur, minOccur
-
Methods inherited from class edu.umd.cs.findbugs.ba.bcp.PatternElement
addOrCheckDefinition, allowTrailingEdges, dominatedBy, getDominatedBy, getLabel, getNext, label, lookup, match, setAllowTrailingEdges, setIndex, setNext, toString
-
-
-
-
Method Detail
-
addOrCheckDefinition
protected MatchResult addOrCheckDefinition(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.- Parameters:
variable
- the Variable which should be added or checked for consistencybindingSet
- the existing set of bindings- Returns:
- a MatchResult containing the updated BindingSet (if the variable is consistent with the previous bindings), or null if the new variable is inconsistent with the previous bindings
-
-