Package edu.umd.cs.findbugs.cwe
Class Weakness
java.lang.Object
edu.umd.cs.findbugs.cwe.Weakness
A weakness represents a single weakness of the Common Weakness Enumeration (CWE). The Common Weakness Enumeration is
a standard taxonomy of weaknesses. This weakness is a simplification of the CWE weakness. It contains far fewer data
points as compared to the CWE list. In addition, it does not contain references to other weaknesses.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final String
private final String
private final WeaknessSeverity
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Weakness
(int cweid, String name, String description, WeaknessSeverity severity) -
Method Summary
-
Field Details
-
cweid
private final int cweid -
name
-
description
-
severity
-
-
Constructor Details
-
Weakness
-
-
Method Details
-
of
public static Weakness of(@NonNull int cweid, @NonNull String name, @NonNull String description, @NonNull WeaknessSeverity severity) Creates a new immutable instance of a weakness- Parameters:
cweid
-name
-description
-severity
-- Returns:
- Weakness
-
getCweId
public int getCweId()- Returns:
- the CWE (Common Weakness Enumeration) Id
-
getName
- Returns:
- the name of the CWE
-
getDescription
- Returns:
- the description of the CWE id
-
getSeverity
It returns always a severity (low, high, medium).- Returns:
- the severity of the CWE id
-