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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate Stringprivate static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final longprivate final intFields inherited from interface BugAnnotation
MESSAGE_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BugAnnotationVisitor visitor) Accept a BugAnnotationVisitor.clone()intbooleanformat(String key, ClassAnnotation primaryClass) Format the annotation as a String.Get a description of this bug annotation.static StringgetShortInteger(int value) static StringgetShortInteger(long value) intgetValue()Get the integer value.inthashCode()booleanIs this annotation used to compute instance hashes or match bug instances across versionsvoidsetDescription(String description) Set a description of this bug annotation.toString()toString(ClassAnnotation primaryClass) private static intuniqueDigits(String value) voidWrite this object to given XMLOutput.void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
DEFAULT_ROLE
- See Also:
-
value
private final int value -
description
-
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:
-
ELEMENT_NAME
- See Also:
-
-
Constructor Details
-
IntAnnotation
public IntAnnotation(int value) Constructor.- Parameters:
value- the integer value
-
-
Method Details
-
clone
- Specified by:
clonein interfaceBugAnnotation- Overrides:
clonein classObject
-
getValue
public int getValue()Get the integer value.- Returns:
- the integer value
-
accept
Description copied from interface:BugAnnotationAccept a BugAnnotationVisitor.- Specified by:
acceptin interfaceBugAnnotation- Parameters:
visitor- the visitor to accept
-
format
Description copied from interface:BugAnnotationFormat 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:
formatin 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
-
uniqueDigits
-
setDescription
Description copied from interface:BugAnnotationSet a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.- Specified by:
setDescriptionin interfaceBugAnnotation
-
getDescription
Description copied from interface:BugAnnotationGet a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.- Specified by:
getDescriptionin interfaceBugAnnotation
-
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<BugAnnotation>
-
toString
-
writeXML
Description copied from interface:XMLWriteableWrite this object to given XMLOutput.- Specified by:
writeXMLin interfaceXMLWriteable- Parameters:
xmlOutput- the XMLOutput for the document- Throws:
IOException
-
writeXML
public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException - Specified by:
writeXMLin interfaceXMLWriteableWithMessages- Throws:
IOException
-
isSignificant
public boolean isSignificant()Description copied from interface:BugAnnotationIs this annotation used to compute instance hashes or match bug instances across versions- Specified by:
isSignificantin interfaceBugAnnotation- Returns:
- true if significant
-
toString
- Specified by:
toStringin interfaceBugAnnotation
-