Package edu.umd.cs.findbugs
Class IntAnnotation
java.lang.Object
edu.umd.cs.findbugs.IntAnnotation
- All Implemented Interfaces:
BugAnnotation
,XMLWriteable
,XMLWriteableWithMessages
,Serializable
,Cloneable
,Comparable<BugAnnotation>
Bug annotation class for integer values.
- Author:
- David Hovemeyer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface edu.umd.cs.findbugs.BugAnnotation
MESSAGE_TAG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BugAnnotationVisitor visitor) Accept a BugAnnotationVisitor.clone()
int
boolean
format
(String key, ClassAnnotation primaryClass) Format the annotation as a String.Get a description of this bug annotation.static String
getShortInteger
(int value) static String
getShortInteger
(long value) int
getValue()
Get the integer value.int
hashCode()
boolean
Is this annotation used to compute instance hashes or match bug instances across versionsvoid
setDescription
(String description) Set a description of this bug annotation.toString()
toString
(ClassAnnotation primaryClass) void
Write this object to given XMLOutput.void
-
Field Details
-
INT_SYNC_PERCENT
- See Also:
-
INT_OCCURRENCES
- See Also:
-
INT_VALUE
- See Also:
-
INT_MIN_VALUE
- See Also:
-
INT_MAX_VALUE
- See Also:
-
INT_SHIFT
- See Also:
-
INT_EXPECTED_ARGUMENTS
- See Also:
-
INT_ACTUAL_ARGUMENTS
- See Also:
-
INT_OBLIGATIONS_REMAINING
- See Also:
-
-
Constructor Details
-
IntAnnotation
public IntAnnotation(int value) Constructor.- Parameters:
value
- the integer value
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceBugAnnotation
- Overrides:
clone
in classObject
-
getValue
public int getValue()Get the integer value.- Returns:
- the integer value
-
accept
Description copied from interface:BugAnnotation
Accept a BugAnnotationVisitor.- Specified by:
accept
in interfaceBugAnnotation
- Parameters:
visitor
- the visitor to accept
-
format
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 interfaceBugAnnotation
- Parameters:
key
- how the annotation should be formattedprimaryClass
- The primary class for the bug; some bug annotation format msgs are simplified in relation to that class.
-
getShortInteger
-
getShortInteger
-
setDescription
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 interfaceBugAnnotation
-
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 interfaceBugAnnotation
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BugAnnotation>
-
toString
-
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
-
writeXML
public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException - Specified by:
writeXML
in interfaceXMLWriteableWithMessages
- Throws:
IOException
-
isSignificant
public boolean isSignificant()Description copied from interface:BugAnnotation
Is this annotation used to compute instance hashes or match bug instances across versions- Specified by:
isSignificant
in interfaceBugAnnotation
- Returns:
- true if significant
-
toString
- Specified by:
toString
in interfaceBugAnnotation
-