Package com.mebigfatguy.fbcontrib.detect
Class FieldCouldBeLocal.FieldInfo
java.lang.Object
com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal.FieldInfo
- Enclosing class:
FieldCouldBeLocal
holds information about a field and it's first usage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final edu.umd.cs.findbugs.FieldAnnotationprivate final booleanprivate edu.umd.cs.findbugs.SourceLineAnnotation -
Constructor Summary
ConstructorsConstructorDescriptionFieldInfo(edu.umd.cs.findbugs.FieldAnnotation fa, boolean hasExternalAnnotation) creates a FieldInfo from an annotation, and assumes no source line information -
Method Summary
Modifier and TypeMethodDescription(package private) edu.umd.cs.findbugs.FieldAnnotationget the field annotation for this field(package private) edu.umd.cs.findbugs.SourceLineAnnotationget the source line annotation for the first use of this field(package private) booleangets whether the field has a non java annotation(package private) voidsetSrcLineAnnotation(edu.umd.cs.findbugs.SourceLineAnnotation sla) set the source line annotation of first use for this fieldtoString()
-
Field Details
-
fieldAnnotation
private final edu.umd.cs.findbugs.FieldAnnotation fieldAnnotation -
srcLineAnnotation
private edu.umd.cs.findbugs.SourceLineAnnotation srcLineAnnotation -
hasAnnotation
private final boolean hasAnnotation
-
-
Constructor Details
-
FieldInfo
FieldInfo(edu.umd.cs.findbugs.FieldAnnotation fa, boolean hasExternalAnnotation) creates a FieldInfo from an annotation, and assumes no source line information- Parameters:
fa- the field annotation for this fieldhasExternalAnnotation- the field has a non java based annotation
-
-
Method Details
-
setSrcLineAnnotation
void setSrcLineAnnotation(edu.umd.cs.findbugs.SourceLineAnnotation sla) set the source line annotation of first use for this field- Parameters:
sla- the source line annotation
-
getFieldAnnotation
edu.umd.cs.findbugs.FieldAnnotation getFieldAnnotation()get the field annotation for this field- Returns:
- the field annotation
-
getSrcLineAnnotation
edu.umd.cs.findbugs.SourceLineAnnotation getSrcLineAnnotation()get the source line annotation for the first use of this field- Returns:
- the source line annotation
-
hasAnnotation
boolean hasAnnotation()gets whether the field has a non java annotation- Returns:
- if the field has a non java annotation
-
toString
-