edu.umd.cs.findbugs
Class BugPattern

java.lang.Object
  extended by edu.umd.cs.findbugs.BugPattern
All Implemented Interfaces:
java.lang.Comparable

public class BugPattern
extends java.lang.Object
implements java.lang.Comparable

A BugPattern object collects all of the metadata for a particular species of BugInstance. Specifically, it stores the human-readable text for displaying a bug instance. BugPatterns derive from the BugPattern elements in the "findbugs.xml" and "messages.xml" found in a FindBugs plugin.

Author:
David Hovemeyer
See Also:
BugInstance

Field Summary
private  java.lang.String abbrev
           
private  java.lang.String category
           
private  java.lang.String detailHTML
           
private  java.lang.String detailText
           
private  boolean experimental
           
private  java.lang.String longDescription
           
private  java.lang.String shortDescription
           
private  java.lang.String type
           
 
Constructor Summary
BugPattern(java.lang.String type, java.lang.String abbrev, java.lang.String category, boolean experimental, java.lang.String shortDescription, java.lang.String longDescription, java.lang.String detailText)
          Constructor.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getAbbrev()
          Get the abbreviation or "bug code".
 java.lang.String getCategory()
          Get the category.
 java.lang.String getDetailHTML()
          Get the detail text as a complete HTML document.
 java.lang.String getDetailText()
          Get the HTML detail text describing the bug.
 java.lang.String getLongDescription()
          Get the long description.
 java.lang.String getShortDescription()
          Get the short description.
 java.lang.String getType()
          Get the type (species).
 int hashCode()
           
 boolean isExperimental()
          Is the bug pattern experimental?
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private java.lang.String type

abbrev

private java.lang.String abbrev

category

private java.lang.String category

experimental

private boolean experimental

shortDescription

private java.lang.String shortDescription

longDescription

private java.lang.String longDescription

detailText

private java.lang.String detailText

detailHTML

private transient java.lang.String detailHTML
Constructor Detail

BugPattern

public BugPattern(java.lang.String type,
                  java.lang.String abbrev,
                  java.lang.String category,
                  boolean experimental,
                  java.lang.String shortDescription,
                  java.lang.String longDescription,
                  java.lang.String detailText)
Constructor.

Parameters:
type - the type (species) of BugInstance
abbrev - the abbreviation or "bug code"; see BugCode
category - the category
experimental - true if the bug pattern is experimental
shortDescription - short one-line description of the bug species
longDescription - longer one-line description; may contain placeholders for use by FindBugsMessageFormat to format BugAnnotations
detailText - HTML text containing a full description of the bug species
Method Detail

getType

public java.lang.String getType()
Get the type (species).


getAbbrev

public java.lang.String getAbbrev()
Get the abbreviation or "bug code".


getCategory

public java.lang.String getCategory()
Get the category.


isExperimental

public boolean isExperimental()
Is the bug pattern experimental?


getShortDescription

public java.lang.String getShortDescription()
Get the short description.


getLongDescription

public java.lang.String getLongDescription()
Get the long description.


getDetailText

public java.lang.String getDetailText()
Get the HTML detail text describing the bug.


getDetailHTML

public java.lang.String getDetailHTML()
Get the detail text as a complete HTML document.


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object