Package net.kautler.command.api
Class Version
- java.lang.Object
-
- net.kautler.command.api.Version
-
@ApplicationScoped public class Version extends Object
A class that provides information about the version of this library.
-
-
Constructor Summary
Constructors Constructor Description Version()
Constructs a new instance of this class, initializing the version constants.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getBuildTimestamp()
Returns the build timestamp at which this library was built.String
getCommitId()
Returns the commit ID from which this library was built.String
getDisplayVersion()
Returns the display version of this library.String
getVersion()
Returns the version of this library.String
toString()
-
-
-
Method Detail
-
getVersion
public String getVersion()
Returns the version of this library.- Returns:
- the version of this library
- See Also:
getDisplayVersion()
-
getCommitId
public String getCommitId()
Returns the commit ID from which this library was built.- Returns:
- the commit ID from which this library was built
- See Also:
getDisplayVersion()
-
getBuildTimestamp
public Instant getBuildTimestamp()
Returns the build timestamp at which this library was built.- Returns:
- the build timestamp at which this library was built
- See Also:
getDisplayVersion()
-
getDisplayVersion
public String getDisplayVersion()
Returns the display version of this library. If the current version is a release version, it is equal toversion
. If the current version is a snapshot version, it consists of theversion
, thecommitId
, and thebuildTimestamp
. For displaying the version somewhere it is best to use this method.- Returns:
- the display version of this library
- See Also:
getVersion()
,getCommitId()
,getDisplayVersion()
-
-