edu.umd.cs.findbugs
Class IntAnnotation

java.lang.Object
  extended by edu.umd.cs.findbugs.IntAnnotation
All Implemented Interfaces:
BugAnnotation, XMLWriteable, java.lang.Comparable<BugAnnotation>

public class IntAnnotation
extends java.lang.Object
implements BugAnnotation

Bug annotation class for integer values.

Author:
David Hovemeyer
See Also:
BugAnnotation

Field Summary
private static java.lang.String DEFAULT_ROLE
           
private  java.lang.String description
           
private static java.lang.String ELEMENT_NAME
           
private  int value
           
 
Constructor Summary
IntAnnotation(int value)
          Constructor.
 
Method Summary
 void accept(BugAnnotationVisitor visitor)
          Accept a BugAnnotationVisitor.
 int compareTo(BugAnnotation o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String format(java.lang.String key)
          Format the annotation as a String.
 java.lang.String getDescription()
          Get a description of this bug annotation.
 int getValue()
          Get the integer value.
 int hashCode()
           
 void setDescription(java.lang.String description)
          Set a description of this bug annotation.
 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

DEFAULT_ROLE

private static final java.lang.String DEFAULT_ROLE
See Also:
Constant Field Values

value

private int value

description

private java.lang.String description

ELEMENT_NAME

private static final java.lang.String ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

IntAnnotation

public IntAnnotation(int value)
Constructor.

Parameters:
value - the integer value
Method Detail

getValue

public int getValue()
Get the integer value.

Returns:
the integer value

accept

public void accept(BugAnnotationVisitor visitor)
Description copied from interface: BugAnnotation
Accept a BugAnnotationVisitor.

Specified by:
accept in interface BugAnnotation
Parameters:
visitor - the visitor to accept

format

public java.lang.String format(java.lang.String key)
Description copied from interface: BugAnnotation
Format the annotation as a String. The given key specifies additional information about how the annotation should be formatted. If the key is empty, then the "default" format will be used.

Specified by:
format in interface BugAnnotation
Parameters:
key - how the annotation should be formatted

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: BugAnnotation
Set a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.

Specified by:
setDescription in interface BugAnnotation

getDescription

public java.lang.String getDescription()
Description copied from interface: BugAnnotation
Get a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.

Specified by:
getDescription in interface BugAnnotation

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(BugAnnotation o)
Specified by:
compareTo in interface java.lang.Comparable<BugAnnotation>

toString

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

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