Package edu.umd.cs.findbugs
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBugDesignation
(BugDesignation that) BugDesignation
(String designation, long timestamp, String annotationText, String user) -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
boolean
return the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc.long
getUser()
boolean
boolean
int
hashCode()
boolean
isDirty()
void
merge
(BugDesignation other) replace unset fields of this user designation with values set in the othervoid
void
setDesignationKey
(String designationKey) set the user designation E.g., "MOSTLY_HARMLESS", "CRITICAL", "NOT_A_BUG", etc.void
setDirty
(boolean dirty) void
setTimestamp
(long ts) void
toString()
void
Write this object to given XMLOutput.
-
Field Details
-
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
- Parameters:
designation
-timestamp
-annotationText
-user
-
-
BugDesignation
-
-
Method Details
-
toString
-
isDirty
public boolean isDirty() -
cleanDirty
public void cleanDirty() -
setDirty
public void setDirty(boolean dirty) -
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
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
-
setUser
-
getTimestamp
public long getTimestamp() -
setTimestamp
public void setTimestamp(long ts) -
getAnnotationText
-
hasAnnotationText
public boolean hasAnnotationText() -
getNonnullAnnotationText
-
setAnnotationText
-
writeXML
Description copied from interface:XMLWriteable
Write this object to given XMLOutput.- Specified by:
writeXML
in interfaceXMLWriteable
- Parameters:
xmlOutput
- the XMLOutput for the document- Throws:
IOException
-
merge
replace unset fields of this user designation with values set in the other -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BugDesignation>
-