edu.umd.cs.findbugs.ba.bcp

Class OneVariableInstruction

public abstract class OneVariableInstruction extends SingleInstruction

Abstract PatternElement subclass for matching single instructions which have a single Variable.

See Also: PatternElement

Constructor Summary
OneVariableInstruction(String varName)
Constructor.
Method Summary
protected MatchResultaddOrCheckDefinition(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.

Constructor Detail

OneVariableInstruction

public OneVariableInstruction(String varName)
Constructor.

Parameters: varName the name of the Variable used in this instruction

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 consistency bindingSet 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

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