edu.umd.cs.findbugs

Class BugProperty

public class BugProperty extends Object implements 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.

Author: David Hovemeyer

Field Summary
static StringIS_BUG
Boolean property defining whether or not the BugInstance is really a bug.
static StringSEVERITY
Integer property defining the warning severity (1=least severe, 5=most severe).
Method Summary
StringgetName()
Get name of property.
StringgetValue()
Get value of property.
booleangetValueAsBoolean()
Get value of property as boolean.
intgetValueAsInt()
Get value of property as an integer.
voidsetValue(String value)
Set value of property.
voidwriteXML(XMLOutput xmlOutput)

Field Detail

IS_BUG

public static final String IS_BUG
Boolean property defining whether or not the BugInstance is really a bug.

SEVERITY

public static final String SEVERITY
Integer property defining the warning severity (1=least severe, 5=most severe).

Method Detail

getName

public String getName()
Get name of property.

Returns: name of property

getValue

public String 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

public void setValue(String value)
Set value of property.

Parameters: value

writeXML

public void writeXML(XMLOutput xmlOutput)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.