Package com.mebigfatguy.fbcontrib.detect
Class FieldCouldBeLocal.FieldInfo
- java.lang.Object
-
- com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal.FieldInfo
-
- Enclosing class:
- FieldCouldBeLocal
private static class FieldCouldBeLocal.FieldInfo extends java.lang.Object
holds information about a field and it's first usage
-
-
Field Summary
Fields Modifier and Type Field Description private edu.umd.cs.findbugs.FieldAnnotation
fieldAnnotation
private boolean
hasAnnotation
private edu.umd.cs.findbugs.SourceLineAnnotation
srcLineAnnotation
-
Constructor Summary
Constructors Constructor Description FieldInfo(edu.umd.cs.findbugs.FieldAnnotation fa, boolean hasExternalAnnotation)
creates a FieldInfo from an annotation, and assumes no source line information
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) edu.umd.cs.findbugs.FieldAnnotation
getFieldAnnotation()
get the field annotation for this field(package private) edu.umd.cs.findbugs.SourceLineAnnotation
getSrcLineAnnotation()
get the source line annotation for the first use of this field(package private) boolean
hasAnnotation()
gets whether the field has a non java annotation(package private) void
setSrcLineAnnotation(edu.umd.cs.findbugs.SourceLineAnnotation sla)
set the source line annotation of first use for this fieldjava.lang.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-