FindBugs™ 1.3.9

edu.umd.cs.findbugs
Class BugDesignation

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

public class BugDesignation
extends java.lang.Object
implements XMLWriteable, java.io.Serializable, java.lang.Comparable<BugDesignation>

class to hold the user annotation and user designation for a BugInstance

See Also:
Serialized Form

Field Summary
static java.lang.String UNCLASSIFIED
          The default key for the user designation.
 
Constructor Summary
BugDesignation()
           
BugDesignation(BugDesignation that)
           
BugDesignation(java.lang.String designation, long timestamp, java.lang.String annotationText, java.lang.String user)
           
 
Method Summary
 void cleanDirty()
           
 int compareTo(BugDesignation o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getAnnotationText()
           
 java.lang.String getDesignationKey()
          return the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc.
 java.lang.String getNonnullAnnotationText()
           
 long getTimestamp()
           
 java.lang.String getUser()
           
 int hashCode()
           
 boolean isDirty()
           
 void merge(BugDesignation other)
          replace unset fields of this user designation with values set in the other
 void setAnnotationText(java.lang.String s)
           
 void setDesignationKey(java.lang.String designationKey)
          set the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc.
 void setTimestamp(long ts)
           
 void setUser(java.lang.String u)
           
 java.lang.String toString()
           
 void writeXML(XMLOutput xmlOutput)
          Write this object to given XMLOutput.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNCLASSIFIED

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

See Also:
Constant Field Values
Constructor Detail

BugDesignation

public BugDesignation()

BugDesignation

public BugDesignation(java.lang.String designation,
                      long timestamp,
                      java.lang.String annotationText,
                      java.lang.String user)
Parameters:
designation -
timestamp -
annotationText -
user -

BugDesignation

public BugDesignation(BugDesignation that)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isDirty

public boolean isDirty()

cleanDirty

public void cleanDirty()

getDesignationKey

@NonNull
public java.lang.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:
I18N.getUserDesignation(String key)

setDesignationKey

public void setDesignationKey(java.lang.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:
I18N.getUserDesignationKeys()

getUser

@CheckForNull
public java.lang.String getUser()

setUser

public void setUser(java.lang.String u)

getTimestamp

public long getTimestamp()

setTimestamp

public void setTimestamp(long ts)

getAnnotationText

@CheckForNull
public java.lang.String getAnnotationText()

getNonnullAnnotationText

@Nonnull
public java.lang.String getNonnullAnnotationText()

setAnnotationText

public void setAnnotationText(java.lang.String s)

writeXML

public void writeXML(XMLOutput xmlOutput)
              throws java.io.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:
java.io.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 java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

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

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.