Package com.norconex.commons.lang
Class PackageManifest
java.lang.Object
com.norconex.commons.lang.PackageManifest
A package manifest containing project or library identifying information.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanConverts the version string to aSemanticVersionusing a strict parser.getTitle()inthashCode()booleanisEmpty()Gets whether this package manifest does not have any attributes set.static PackageManifestCreates a new aPackageManifest.toString()Returns a friendly string representation of this package manifest or an empty string if this package manifest is empty (no attributes set).
-
Method Details
-
of
Creates a new aPackageManifest. given class.- Parameters:
cls- the class for which to get the package manifest- Returns:
- package manifest, never
null
-
getSemanticVersion
Converts the version string to aSemanticVersionusing a strict parser. If the package manifest does not provide a version, this method will returnSemanticVersion.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:
trueif empty
-
toString
Returns a friendly string representation of this package manifest or an empty string if this package manifest is empty (no attributes set). -
equals
-
hashCode
public int hashCode() -
getVersion
-
getVendor
-
getTitle
-