Class DependencyInformation

  • Direct Known Subclasses:
    ProjectInformation

    public class DependencyInformation
    extends java.lang.Object
    An data-structure documenting external dependencies. Use this in your ProjectInformation implementation to tell users what other libraries you use to give them proper credit.
    Author:
    : Thomas Morgner
    • Constructor Summary

      Constructors 
      Constructor Description
      DependencyInformation​(java.lang.String name)
      Creates a minimal dependency information object for the library with the given name.
      DependencyInformation​(java.lang.String name, java.lang.String version, java.lang.String licenseName, java.lang.String info)
      Creates a minimal dependency information object for the library with the given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Tests this object for equality.
      java.lang.String getInfo()
      Returns the extra information.
      java.lang.String getLicenseName()
      Returns the name of the license of this dependency.
      java.lang.String getName()
      Returns the name of the dependency, which is never null.
      java.lang.String getVersion()
      Returns the version number.
      int hashCode()
      Computes a hashcode based on the name of the dependency.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DependencyInformation

        public DependencyInformation​(java.lang.String name)
        Creates a minimal dependency information object for the library with the given name.
        Parameters:
        name - the name of the library, never null.
      • DependencyInformation

        public DependencyInformation​(java.lang.String name,
                                     java.lang.String version,
                                     java.lang.String licenseName,
                                     java.lang.String info)
        Creates a minimal dependency information object for the library with the given name. All properties but the name are optional.
        Parameters:
        name - the name of the library, never null.
        version - The version of the library, if known.
        licenseName - The license the library is distributed under.
        info - Some more information, liek a web-site or comment.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the dependency, which is never null.
        Returns:
        the name.
      • getVersion

        public java.lang.String getVersion()
        Returns the version number.
        Returns:
        the version information, or null if no version information is known.
      • getLicenseName

        public java.lang.String getLicenseName()
        Returns the name of the license of this dependency.
        Returns:
        the license name.
      • getInfo

        public java.lang.String getInfo()
        Returns the extra information.
        Returns:
        the text information, or null if no extra information is known.
      • equals

        public boolean equals​(java.lang.Object o)
        Tests this object for equality. The object is equal if the name matches, the extra information is ignored.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the other object.
        Returns:
        true, if the dependency information given denotes the same library as this dependency information.
      • hashCode

        public int hashCode()
        Computes a hashcode based on the name of the dependency.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashcode.