Class PackageManifest

java.lang.Object
com.norconex.commons.lang.PackageManifest

public final class PackageManifest extends Object
A package manifest containing project or library identifying information.
Since:
3.0.0
  • Method Details

    • of

      public static PackageManifest of(@NonNull @NonNull Class<?> cls)
      Creates a new a PackageManifest. given class.
      Parameters:
      cls - the class for which to get the package manifest
      Returns:
      package manifest, never null
    • getSemanticVersion

      public SemanticVersion getSemanticVersion()
      Converts the version string to a SemanticVersion using a strict parser. If the package manifest does not provide a version, this method will return SemanticVersion.UNVERSIONED.
      Returns:
      semantic version, never null
      Throws:
      SemanticVersionParserException - if the string version could not be parsed
    • isEmpty

      public boolean isEmpty()
      Gets whether this package manifest does not have any attributes set.
      Returns:
      true if empty
    • toString

      public String toString()
      Returns a friendly string representation of this package manifest or an empty string if this package manifest is empty (no attributes set).
      Overrides:
      toString in class Object
    • equals

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

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

      public String getVersion()
    • getVendor

      public String getVendor()
    • getTitle

      public String getTitle()