FindBugs™ 1.3.8

edu.umd.cs.findbugs
Class BugDesignation

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

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

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(java.lang.String designation, long timestamp, java.lang.String annotationText, java.lang.String user)
           
 
Method Summary
 java.lang.String getAnnotationText()
           
 java.lang.String getDesignationKey()
          return the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc.
 long getTimestamp()
           
 java.lang.String getUser()
           
 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)
           
 void writeXML(XMLOutput xmlOutput)
          Write this object to given XMLOutput.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 -
Method Detail

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()

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


FindBugs™ 1.3.8

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