public class StringAnnotation extends Object implements BugAnnotation
BugAnnotation,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ROLE |
static String |
ERROR_MSG_ROLE |
static String |
FORMAT_SPECIFIER_ROLE |
static String |
FORMAT_STRING_ROLE |
static String |
PARAMETER_NAME_ROLE |
static String |
REGEX_ROLE |
static String |
REMAINING_OBLIGATIONS_ROLE |
static String |
STRING_CONSTANT_ROLE |
static String |
STRING_MESSAGE |
static String |
STRING_NONSTRING_CONSTANT_ROLE
Used for non-string constants (e.g., null)
|
static String |
TYPE_QUALIFIER_ROLE |
MESSAGE_TAG| Constructor and Description |
|---|
StringAnnotation(String value)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BugAnnotationVisitor visitor)
Accept a BugAnnotationVisitor.
|
Object |
clone() |
int |
compareTo(BugAnnotation o) |
boolean |
equals(Object o) |
String |
format(String key,
ClassAnnotation primaryClass)
Format the annotation as a String.
|
static StringAnnotation |
fromRawString(String value) |
static StringAnnotation |
fromXMLEscapedString(String value) |
String |
getDescription()
Get a description of this bug annotation.
|
String |
getValue()
Get the String value.
|
int |
hashCode() |
boolean |
isSignificant()
Is this annotation used to compute instance hashes or match bug instances
across versions
|
void |
setDescription(String description)
Set a description of this bug annotation.
|
String |
toString() |
String |
toString(ClassAnnotation primaryClass) |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
|
void |
writeXML(XMLOutput xmlOutput,
boolean addMessages,
boolean isPrimary) |
public static final String DEFAULT_ROLE
public static final String STRING_CONSTANT_ROLE
public static final String STRING_NONSTRING_CONSTANT_ROLE
public static final String REGEX_ROLE
public static final String ERROR_MSG_ROLE
public static final String STRING_MESSAGE
public static final String PARAMETER_NAME_ROLE
public static final String TYPE_QUALIFIER_ROLE
public static final String REMAINING_OBLIGATIONS_ROLE
public static final String FORMAT_STRING_ROLE
public static final String FORMAT_SPECIFIER_ROLE
public StringAnnotation(String value)
value - the String valuepublic static StringAnnotation fromRawString(String value)
public static StringAnnotation fromXMLEscapedString(String value)
public Object clone()
clone in interface BugAnnotationclone in class Objectpublic String getValue()
public void accept(BugAnnotationVisitor visitor)
BugAnnotationaccept in interface BugAnnotationvisitor - the visitor to acceptpublic String format(String key, ClassAnnotation primaryClass)
BugAnnotationformat in interface BugAnnotationkey - how the annotation should be formattedprimaryClass - The primary class for the bug; some bug annotation format msgs
are simplified in relation to that class.public void setDescription(String description)
BugAnnotationsetDescription in interface BugAnnotationpublic String getDescription()
BugAnnotationgetDescription in interface BugAnnotationpublic int compareTo(BugAnnotation o)
compareTo in interface Comparable<BugAnnotation>public void writeXML(XMLOutput xmlOutput) throws IOException
XMLWriteablewriteXML in interface XMLWriteablexmlOutput - the XMLOutput for the documentIOExceptionpublic void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException
writeXML in interface XMLWriteableWithMessagesIOExceptionpublic boolean isSignificant()
BugAnnotationisSignificant in interface BugAnnotationpublic String toString(ClassAnnotation primaryClass)
toString in interface BugAnnotationCopyright © 2003–2015. All rights reserved.