Class BugCode

java.lang.Object
edu.umd.cs.findbugs.BugCode
All Implemented Interfaces:
Comparable<BugCode>

public class BugCode extends Object implements 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:
  • Constructor Details

    • BugCode

      public BugCode(String abbrev, String description)
      Constructor.
      Parameters:
      abbrev - the abbreviation for the bug code
      description - a short textual description of the class of bug pattern represented by this bug code
    • BugCode

      public BugCode(String abbrev, String description, int cweid)
  • Method Details

    • getAbbrev

      public String getAbbrev()
      Get the abbreviation for this bug code.
    • getDescription

      public String getDescription()
      Get the short textual description of the bug code.
    • toString

      public String toString()
      Get the abbreviation fo this bug code.
      Overrides:
      toString in class Object
    • getCWEid

      public int getCWEid()
      Returns:
      Returns the cweid.
    • compareTo

      public int compareTo(BugCode o)
      Specified by:
      compareTo in interface Comparable<BugCode>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object