java.lang.Object
io.aiven.commons.system.VersionInfo
This class was originally developed by the Apache RAT project A formatter for
Package information about a class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor that uses the VersionInfo package for information.VersionInfo(Class<?> clazz) Constructor for a specific class. -
Method Summary
Modifier and TypeMethodDescriptionGets the specification title of the package.Gets the specification vendor of the package.Gets the specification version of the package.getTitle()Gets the implementation title of the package.Gets the implementation vendor of the package.Gets the implementation version of the package.static voidMain class to print version information.toString()Default string representation of the implementation information from the package.
-
Constructor Details
-
VersionInfo
public VersionInfo()Constructor that uses the VersionInfo package for information. -
VersionInfo
Constructor for a specific class.- Parameters:
clazz- the class to get the Package information from.
-
-
Method Details
-
toString
Default string representation of the implementation information from the package. -
getVersion
Gets the implementation version of the package. Will return "VERSION-NUMBER" if package information is not available.- Returns:
- the implementation version.
-
getVendor
Gets the implementation vendor of the package. Will return "VENDOR-NAME" if package information is not available.- Returns:
- the implementation vendor
-
getTitle
Gets the implementation title of the package. Will return "TITLE" if package information is not available.- Returns:
- the implementation title
-
getSpecVersion
Gets the specification version of the package. Will return "SPEC-VERSION" if package information is not available.- Returns:
- the specification version.
-
getSpecVendor
Gets the specification vendor of the package. Will return "SPEC-VENDOR" if package information is not available.- Returns:
- the specification vendor
-
getSpecTitle
Gets the specification title of the package. Will return "SPEC-TITLE" if package information is not available.- Returns:
- the specification title
-
main
Main class to print version information.If specified the arguments are assumed to be class names and the Version info for each class printed. If not specified the version info for this class is printed.
- Parameters:
args- the optional class names.- Throws:
ClassNotFoundException- if a clas name can not be resolved.
-