public class ClassAnnotation extends PackageMemberAnnotation
BugAnnotation,
BugInstance,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
ANNOTATION_ROLE |
static String |
IMPLEMENTED_INTERFACE_ROLE |
static String |
INTERFACE_ROLE |
static String |
RECOMMENDED_SUPERCLASS_ROLE |
static String |
SUBCLASS_ROLE |
static String |
SUPERCLASS_ROLE |
static String |
TYPE_QUALIFIER_ROLE |
className, descriptionsourceFileName, sourceLinesMESSAGE_TAG| Constructor and Description |
|---|
ClassAnnotation(String className)
Constructor.
|
ClassAnnotation(String className,
String sourceFileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BugAnnotationVisitor visitor)
Accept a BugAnnotationVisitor.
|
int |
compareTo(BugAnnotation o) |
boolean |
contains(ClassAnnotation other) |
boolean |
equals(Object o) |
protected String |
formatPackageMember(String key,
ClassAnnotation primaryClass)
Do default and subclass-specific formatting.
|
static ClassAnnotation |
fromClassDescriptor(ClassDescriptor classDescriptor)
Factory method to create a ClassAnnotation from a ClassDescriptor.
|
SourceLineAnnotation |
getSourceLines()
Get the SourceLineAnnotation describing the source lines where the method
is defined.
|
static SourceLineAnnotation |
getSourceLinesForClass(String className,
String sourceFileName) |
ClassAnnotation |
getTopLevelClass() |
int |
hashCode() |
boolean |
isSignificant()
Is this annotation used to compute instance hashes or match bug instances
across versions
|
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
|
void |
writeXML(XMLOutput xmlOutput,
boolean addMessages,
boolean isPrimary) |
format, getClassDescriptor, getClassName, getDescription, getPackageName, getSimpleClassName, getSlashedClassName, removePackage, removePackageName, setDescription, shorten, toString, toStringclone, getSourceFileName, setSourceLinespublic static final String SUBCLASS_ROLE
public static final String SUPERCLASS_ROLE
public static final String RECOMMENDED_SUPERCLASS_ROLE
public static final String IMPLEMENTED_INTERFACE_ROLE
public static final String INTERFACE_ROLE
public static final String ANNOTATION_ROLE
public static final String TYPE_QUALIFIER_ROLE
public ClassAnnotation(@DottedClassName String className)
className - the name of the classpublic ClassAnnotation(@DottedClassName String className, String sourceFileName)
public boolean isSignificant()
BugAnnotationisSignificant in interface BugAnnotationisSignificant in class PackageMemberAnnotationpublic static ClassAnnotation fromClassDescriptor(ClassDescriptor classDescriptor)
classDescriptor - the ClassDescriptorpublic void accept(BugAnnotationVisitor visitor)
BugAnnotationvisitor - the visitor to acceptprotected String formatPackageMember(String key, ClassAnnotation primaryClass)
PackageMemberAnnotationformatPackageMember in class PackageMemberAnnotationkey - the key specifying how to do the formattingprimaryClass - TODOpublic boolean contains(ClassAnnotation other)
public ClassAnnotation getTopLevelClass()
public int compareTo(BugAnnotation o)
public SourceLineAnnotation getSourceLines()
BugAnnotationWithSourceLinesgetSourceLines in class BugAnnotationWithSourceLinespublic static SourceLineAnnotation getSourceLinesForClass(@DottedClassName String className, String sourceFileName)
public void writeXML(XMLOutput xmlOutput) throws IOException
XMLWriteablexmlOutput - the XMLOutput for the documentIOExceptionpublic void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException
IOExceptionCopyright © 2003–2015. All rights reserved.