Class Reference

java.lang.Object
org.owasp.dependencycheck.dependency.Reference
All Implemented Interfaces:
Serializable, Comparable<Reference>

@ThreadSafe public class Reference extends Object implements Serializable, Comparable<Reference>
An external reference for a vulnerability. This contains a name, URL, and a source.
Author:
Jeremy Long
See Also:
  • Constructor Details

    • Reference

      public Reference()
      Creates a new reference.
    • Reference

      public Reference(String name, String source, String url)
      Creates a new reference.
      Parameters:
      name - the reference name
      source - the reference source
      url - the reference url
  • Method Details

    • getName

      public String getName()
      Get the value of name.
      Returns:
      the value of name
    • setName

      public void setName(String name)
      Set the value of name.
      Parameters:
      name - new value of name
    • getUrl

      public String getUrl()
      Get the value of url.
      Returns:
      the value of url
    • setUrl

      public void setUrl(String url)
      Set the value of url.
      Parameters:
      url - new value of url
    • getSource

      public String getSource()
      Get the value of source.
      Returns:
      the value of source
    • setSource

      public void setSource(String source)
      Set the value of source.
      Parameters:
      source - new value of source
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(@NonNull Reference o)
      Implementation of the comparable interface.
      Specified by:
      compareTo in interface Comparable<Reference>
      Parameters:
      o - the Reference being compared
      Returns:
      an integer indicating the ordering of the two objects