Package edu.umd.cs.findbugs
Class BugPattern
java.lang.Object
edu.umd.cs.findbugs.BugPattern
- All Implemented Interfaces:
Comparable<BugPattern>
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(BugPattern other) booleanGet the BugKindGet the BugCodeGet the BugCategoryintgetCWEid()Get the detail text as a complete HTML document.getDetailHTML(String detailText) Get the Plain text describing the bug.Get the HTML detail text describing the bug.Get the long description.Get the short description.getType()Get the BugPatterngetUri()inthashCode()booleanbooleanIs the bug pattern experimental?toString()wrapInDescriptionLink(String text)
-
Constructor Details
-
BugPattern
public BugPattern(String type, String abbrev, String category, boolean experimental, String shortDescription, String longDescription, String detailText, String bugsUrl, int cweid) Constructor.- Parameters:
type- the type (species) of BugInstanceabbrev- the abbreviation or "bug code"; seeBugCodecategory- the categoryexperimental- true if the bug pattern is experimentalshortDescription- short one-line description of the bug specieslongDescription- longer one-line description; may contain placeholders for use byFindBugsMessageFormatto format BugAnnotationsdetailText- HTML text containing a full description of the bug speciesbugsUrl- URL of web-page containing bug descriptions or null if there's no such page.cweid- Common Weakness Enumeration (CWE) ID of the bug pattern
-
-
Method Details
-
getType
Get the BugPattern -
getAbbrev
Get the BugKind -
getBugCode
Get the BugCode -
getCategory
Get the BugCategory -
getCategoryAbbrev
-
isExperimental
public boolean isExperimental()Is the bug pattern experimental? -
getShortDescription
Get the short description. -
getLongDescription
Get the long description. -
getDetailText
Get the HTML detail text describing the bug. -
getDetailPlainText
Get the Plain text describing the bug. -
getDetailHTML
Get the detail text as a complete HTML document. -
getDetailHTML
-
wrapInDescriptionLink
-
getUri
-
compareTo
- Specified by:
compareToin interfaceComparable<BugPattern>
-
hashCode
public int hashCode() -
equals
-
getCWEid
public int getCWEid()- Returns:
- Returns the cweid.
-
toString
-
isDeprecated
public boolean isDeprecated()- Returns:
- true if this bug pattern is not used anymore and exists for backward compatibility only
-