Package edu.umd.cs.findbugs
Class BugCode
- java.lang.Object
-
- edu.umd.cs.findbugs.BugCode
-
- All Implemented Interfaces:
java.lang.Comparable<BugCode>
public class BugCode extends java.lang.Object implements java.lang.Comparable<BugCode>
A BugCode is an abbreviation that is shared among some number of BugPatterns. For example, the code "HE" is shared by all of the BugPatterns that represent hashcode/equals violations.- Author:
- David Hovemeyer
- See Also:
BugPattern
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BugCode o)booleanequals(java.lang.Object o)java.lang.StringgetAbbrev()Get the abbreviation for this bug code.intgetCWEid()java.lang.StringgetDescription()Get the short textual description of the bug code.inthashCode()java.lang.StringtoString()Get the abbreviation fo this bug code.
-
-
-
Constructor Detail
-
BugCode
public BugCode(java.lang.String abbrev, java.lang.String description)Constructor.- Parameters:
abbrev- the abbreviation for the bug codedescription- a short textual description of the class of bug pattern represented by this bug code
-
BugCode
public BugCode(java.lang.String abbrev, java.lang.String description, int cweid)
-
-
Method Detail
-
getAbbrev
public java.lang.String getAbbrev()
Get the abbreviation for this bug code.
-
getDescription
public java.lang.String getDescription()
Get the short textual description of the bug code.
-
toString
public java.lang.String toString()
Get the abbreviation fo this bug code.- Overrides:
toStringin classjava.lang.Object
-
getCWEid
public int getCWEid()
- Returns:
- Returns the cweid.
-
compareTo
public int compareTo(BugCode o)
- Specified by:
compareToin interfacejava.lang.Comparable<BugCode>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-