Class FieldCouldBeLocal.FieldInfo

  • Enclosing class:
    FieldCouldBeLocal

    private static class FieldCouldBeLocal.FieldInfo
    extends java.lang.Object
    holds information about a field and it's first usage
    • 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 field
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • fieldAnnotation

        private final edu.umd.cs.findbugs.FieldAnnotation fieldAnnotation
      • srcLineAnnotation

        private edu.umd.cs.findbugs.SourceLineAnnotation srcLineAnnotation
      • hasAnnotation

        private final boolean hasAnnotation
    • 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 field
        hasExternalAnnotation - 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 class java.lang.Object