public class TypeAnnotation extends BugAnnotationWithSourceLines
ClassAnnotation,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
CLOSEIT_ROLE |
static String |
DEFAULT_ROLE |
static String |
EXPECTED_ROLE |
static String |
FOUND_ROLE |
static String |
UNHASHABLE_ROLE |
sourceFileName, sourceLinesMESSAGE_TAG| Constructor and Description |
|---|
TypeAnnotation(String typeDescriptor)
constructor.
|
TypeAnnotation(String typeDescriptor,
String roleDescription) |
TypeAnnotation(org.apache.bcel.generic.Type objectType) |
TypeAnnotation(org.apache.bcel.generic.Type objectType,
String roleDescription) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BugAnnotationVisitor visitor)
Accept a BugAnnotationVisitor.
|
int |
compareTo(BugAnnotation o) |
boolean |
equals(Object o) |
String |
format(String key,
ClassAnnotation primaryClass)
Format the annotation as a String.
|
String |
getDescription()
Get a description of this bug annotation.
|
String |
getTypeDescriptor()
Get the type descriptor.
|
String |
getTypeParameters() |
int |
hashCode() |
boolean |
isSignificant()
Is this annotation used to compute instance hashes or match bug instances
across versions
|
void |
setDescription(String roleDescription)
Set a description of this bug annotation.
|
void |
setTypeParameters(String typeParameters) |
String |
toString() |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
|
void |
writeXML(XMLOutput xmlOutput,
boolean addMessages,
boolean isPrimary) |
clone, getSourceFileName, getSourceLines, setSourceLines, toStringpublic static final String DEFAULT_ROLE
public static final String EXPECTED_ROLE
public static final String FOUND_ROLE
public static final String CLOSEIT_ROLE
public static final String UNHASHABLE_ROLE
public TypeAnnotation(String typeDescriptor)
For information on type descriptors,
see http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.
html#14152
or http://www.murrayc.com/learning/java/java_classfileformat.shtml#
TypeDescriptors
typeDescriptor - a jvm type descriptor, such as "[I"public TypeAnnotation(org.apache.bcel.generic.Type objectType)
public TypeAnnotation(org.apache.bcel.generic.Type objectType,
String roleDescription)
public String getTypeDescriptor()
public void accept(BugAnnotationVisitor visitor)
BugAnnotationvisitor - the visitor to acceptpublic String format(String key, ClassAnnotation primaryClass)
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 roleDescription)
BugAnnotationpublic String getDescription()
BugAnnotationpublic void setTypeParameters(String typeParameters)
public String getTypeParameters()
public int compareTo(BugAnnotation o)
public void writeXML(XMLOutput xmlOutput) throws IOException
XMLWriteablexmlOutput - the XMLOutput for the documentIOExceptionpublic void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException
IOExceptionpublic boolean isSignificant()
BugAnnotationCopyright © 2003–2015. All rights reserved.