| java.lang.Object edu.umd.cs.findbugs.ba.bcp.PatternElement edu.umd.cs.findbugs.ba.bcp.SingleInstruction edu.umd.cs.findbugs.ba.bcp.FieldAccess
All known Subclasses: edu.umd.cs.findbugs.ba.bcp.Store, edu.umd.cs.findbugs.ba.bcp.Load,
FieldAccess | abstract public class FieldAccess extends SingleInstruction implements org.apache.bcel.Constants(Code) | | Base class for Load and Store PatternElements.
Handles some of the grunt work of representing fields and
extracting field values from the stack frame.
author: David Hovemeyer See Also: Load See Also: Store |
Method Summary | |
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(FieldInstruction fieldIns, ConstantPoolGen cpg) Return whether the given FieldInstruction accesses a long or double field. | protected static Variable | snarfFieldValue(FieldInstruction fieldIns, ConstantPoolGen cpg, ValueNumberFrame frame) Get a Variable representing the stack value which will either be stored
into or loaded from a field. |
FieldAccess | public FieldAccess(String fieldVarName, String valueVarName)(Code) | | Constructor.
Parameters: fieldVarName - name of the variable to bind to the field Parameters: valueVarName - name of the variable to bind to the value store in or loaded from the field |
checkConsistent | protected MatchResult checkConsistent(Variable field, Variable value, BindingSet bindingSet)(Code) | | Check that the Variables determined for the field and the value loaded/stored
are consistent with previous variable definitions.
Parameters: field - Variable representing the field Parameters: value - Variable representing the value loaded/stored Parameters: bindingSet - previous definitions a MatchResult containing an updated BindingSet if successful,or null if unsucessful |
isLongOrDouble | protected static boolean isLongOrDouble(FieldInstruction fieldIns, ConstantPoolGen cpg)(Code) | | Return whether the given FieldInstruction accesses a long or double field.
Parameters: fieldIns - the FieldInstruction Parameters: cpg - the ConstantPoolGen for the method |
snarfFieldValue | protected static Variable snarfFieldValue(FieldInstruction fieldIns, ConstantPoolGen cpg, ValueNumberFrame frame) throws DataflowAnalysisException(Code) | | Get a Variable representing the stack value which will either be stored
into or loaded from a field.
Parameters: fieldIns - the FieldInstruction accessing the field Parameters: cpg - the ConstantPoolGen for the method Parameters: frame - the ValueNumberFrame containing the value to be storedor the value loaded |
|
|