Package edu.umd.cs.findbugs
Class BugProperty
java.lang.Object
edu.umd.cs.findbugs.BugProperty
- All Implemented Interfaces:
XMLWriteable
,Serializable
,Cloneable
Name/value metadata pair that may be attached to a BugInstance. These are
different from BugAnnotations because they are not meant to be shown directly
to the user.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Boolean property defining whether or not the BugInstance is really a bug.private final String
private BugProperty
private static final long
static final String
Integer property defining the warning severity (1=least severe, 5=most severe).private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
getName()
Get name of property.(package private) BugProperty
getNext()
Get next property in list.getValue()
Get value of property.boolean
Get value of property as boolean.int
Get value of property as an integer.(package private) void
setNext
(BugProperty next) Set next property in list.void
Set value of property.void
Write this object to given XMLOutput.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
IS_BUG
Boolean property defining whether or not the BugInstance is really a bug.- See Also:
-
SEVERITY
Integer property defining the warning severity (1=least severe, 5=most severe).- See Also:
-
name
-
value
-
next
-
-
Constructor Details
-
BugProperty
Constructor.- Parameters:
name
- name of propertyvalue
- value of property
-
-
Method Details
-
clone
-
getName
Get name of property.- Returns:
- name of property
-
getValue
Get value of property.- Returns:
- value of property
-
getValueAsBoolean
public boolean getValueAsBoolean()Get value of property as boolean.- Returns:
- value of property as a boolean
-
getValueAsInt
public int getValueAsInt()Get value of property as an integer.- Returns:
- value of property as integer
- Throws:
NumberFormatException
- if the value cannot be parsed as an integer
-
setValue
Set value of property.- Parameters:
value
-
-
setNext
Set next property in list.- Parameters:
next
- next property in list
-
getNext
BugProperty getNext()Get next property in list.- Returns:
- next property in list
-
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
-