Class BugDesignation

java.lang.Object
edu.umd.cs.findbugs.BugDesignation
All Implemented Interfaces:
XMLWriteable, Serializable, Comparable<BugDesignation>

public class BugDesignation extends Object implements XMLWriteable, Serializable, Comparable<BugDesignation>
class to hold the user annotation and user designation for a BugInstance
See Also:
  • Field Details

    • UNCLASSIFIED

      public static final String UNCLASSIFIED
      The default key for the user designation. Bad things could happen if this key isn't in getUserDesignations()
  • Constructor Details

    • BugDesignation

      public BugDesignation()
    • BugDesignation

      public BugDesignation(String designation, long timestamp, String annotationText, String user)
      Parameters:
      designation -
      timestamp -
      annotationText -
      user -
    • BugDesignation

      public BugDesignation(BugDesignation that)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isDirty

      public boolean isDirty()
    • cleanDirty

      public void cleanDirty()
    • setDirty

      public void setDirty(boolean dirty)
    • getDesignationKey

      @Nonnull public String getDesignationKey()
      return the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc. Note that this is the key, suitable for writing to XML, but not for showing to the user.
      See Also:
    • hasDesignationKey

      public boolean hasDesignationKey()
    • setDesignationKey

      public void setDesignationKey(String designationKey)
      set the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc. If the argument is null, it will be treated as UNCLASSIFIED. Note that this is the key, suitable for writing to XML, but not what the user sees. Strange things could happen if designationKey is not one of the keys returned by I18N.instance().getUserDesignations().
      See Also:
    • getUser

      @CheckForNull public String getUser()
    • setUser

      public void setUser(String u)
    • getTimestamp

      public long getTimestamp()
    • setTimestamp

      public void setTimestamp(long ts)
    • getAnnotationText

      @CheckForNull public String getAnnotationText()
    • hasAnnotationText

      public boolean hasAnnotationText()
    • getNonnullAnnotationText

      @Nonnull public String getNonnullAnnotationText()
    • setAnnotationText

      public void setAnnotationText(String s)
    • writeXML

      public void writeXML(XMLOutput xmlOutput) throws IOException
      Description copied from interface: XMLWriteable
      Write this object to given XMLOutput.
      Specified by:
      writeXML in interface XMLWriteable
      Parameters:
      xmlOutput - the XMLOutput for the document
      Throws:
      IOException
    • merge

      public void merge(@CheckForNull BugDesignation other)
      replace unset fields of this user designation with values set in the other
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(BugDesignation o)
      Specified by:
      compareTo in interface Comparable<BugDesignation>