edu.umd.cs.findbugs

Class TypeAnnotation

public class TypeAnnotation extends Object implements BugAnnotation

Bug annotation class for java types. This is of lighter weight than ClassAnnotation, and can be used for things like array types.

See Also: ClassAnnotation

Field Summary
static StringCLOSEIT_ROLE
static StringDEFAULT_ROLE
static StringEXPECTED_ROLE
static StringFOUND_ROLE
static StringUNHASHABLE_ROLE
Constructor Summary
TypeAnnotation(String typeDescriptor)
constructor.
TypeAnnotation(String typeDescriptor, String roleDescription)
Method Summary
voidaccept(BugAnnotationVisitor visitor)
intcompareTo(BugAnnotation o)
Stringformat(String key, ClassAnnotation primaryClass)
StringgetDescription()
StringgetTypeDescriptor()
Get the type descriptor.
booleanisSignificant()
voidsetDescription(String roleDescription)
voidwriteXML(XMLOutput xmlOutput)
voidwriteXML(XMLOutput xmlOutput, boolean addMessages)

Field Detail

CLOSEIT_ROLE

public static final String CLOSEIT_ROLE

DEFAULT_ROLE

public static final String DEFAULT_ROLE

EXPECTED_ROLE

public static final String EXPECTED_ROLE

FOUND_ROLE

public static final String FOUND_ROLE

UNHASHABLE_ROLE

public static final String UNHASHABLE_ROLE

Constructor Detail

TypeAnnotation

public TypeAnnotation(String typeDescriptor)
constructor.

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

Parameters: typeDescriptor a jvm type descriptor, such as "[I"

TypeAnnotation

public TypeAnnotation(String typeDescriptor, String roleDescription)

Method Detail

accept

public void accept(BugAnnotationVisitor visitor)

compareTo

public int compareTo(BugAnnotation o)

format

public String format(String key, ClassAnnotation primaryClass)

getDescription

public String getDescription()

getTypeDescriptor

public String getTypeDescriptor()
Get the type descriptor.

Returns: the jvm type descriptor, such as "[I"

isSignificant

public boolean isSignificant()

setDescription

public void setDescription(String roleDescription)

writeXML

public void writeXML(XMLOutput xmlOutput)

writeXML

public void writeXML(XMLOutput xmlOutput, boolean addMessages)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.