Class FieldCouldBeLocal.FieldInfo

java.lang.Object
com.mebigfatguy.fbcontrib.detect.FieldCouldBeLocal.FieldInfo
Enclosing class:
FieldCouldBeLocal

private static class FieldCouldBeLocal.FieldInfo extends Object
holds information about a field and it's first usage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final edu.umd.cs.findbugs.FieldAnnotation
     
    private final boolean
     
    private edu.umd.cs.findbugs.SourceLineAnnotation
     
  • 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

    Modifier and Type
    Method
    Description
    (package private) edu.umd.cs.findbugs.FieldAnnotation
    get the field annotation for this field
    (package private) edu.umd.cs.findbugs.SourceLineAnnotation
    get the source line annotation for the first use of this field
    (package private) boolean
    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 field
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 field
      hasExternalAnnotation - 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

      public String toString()
      Overrides:
      toString in class Object