public abstract class FieldAccess extends SingleInstruction
Constructor and Description |
---|
FieldAccess(java.lang.String fieldVarName,
java.lang.String valueVarName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected MatchResult |
checkConsistent(Variable field,
Variable value,
BindingSet bindingSet)
Check that the Variables determined for the field and the value
loaded/stored are consistent with previous variable definitions.
|
protected static boolean |
isLongOrDouble(org.apache.bcel.generic.FieldInstruction fieldIns,
org.apache.bcel.generic.ConstantPoolGen cpg)
Return whether the given FieldInstruction accesses a long or double
field.
|
protected static Variable |
snarfFieldValue(org.apache.bcel.generic.FieldInstruction fieldIns,
org.apache.bcel.generic.ConstantPoolGen cpg,
ValueNumberFrame frame)
Get a Variable representing the stack value which will either be stored
into or loaded from a field.
|
acceptBranch, maxOccur, minOccur
addOrCheckDefinition, allowTrailingEdges, dominatedBy, getDominatedBy, getLabel, getNext, label, lookup, match, setAllowTrailingEdges, setIndex, setNext, toString
public FieldAccess(java.lang.String fieldVarName, java.lang.String valueVarName)
fieldVarName
- name of the variable to bind to the fieldvalueVarName
- name of the variable to bind to the value store in or loaded
from the fieldprotected MatchResult checkConsistent(Variable field, Variable value, BindingSet bindingSet)
field
- Variable representing the fieldvalue
- Variable representing the value loaded/storedbindingSet
- previous definitionsprotected static boolean isLongOrDouble(org.apache.bcel.generic.FieldInstruction fieldIns, org.apache.bcel.generic.ConstantPoolGen cpg)
fieldIns
- the FieldInstructioncpg
- the ConstantPoolGen for the methodprotected static Variable snarfFieldValue(org.apache.bcel.generic.FieldInstruction fieldIns, org.apache.bcel.generic.ConstantPoolGen cpg, ValueNumberFrame frame) throws DataflowAnalysisException
fieldIns
- the FieldInstruction accessing the fieldcpg
- the ConstantPoolGen for the methodframe
- the ValueNumberFrame containing the value to be stored or the
value loadedDataflowAnalysisException
SpotBugs is licensed under the LGPL.