use of edu.umd.cs.findbugs.SourceLineAnnotation in project fb-contrib by mebigfatguy.
the class FieldCouldBeLocal method sawOpcode.
/**
* implements the visitor to add SourceLineAnnotations for fields in constructors and static initializers.
*
* @param seen
* the opcode of the currently visited instruction
*/
@Override
public void sawOpcode(int seen) {
if ((seen == Const.GETFIELD) || (seen == Const.PUTFIELD)) {
String fieldName = getNameConstantOperand();
FieldInfo fi = localizableFields.get(fieldName);
if (fi != null) {
SourceLineAnnotation sla = SourceLineAnnotation.fromVisitedInstruction(this);
fi.setSrcLineAnnotation(sla);
}
}
}
Aggregations