Package com.irurueta.commons
Class BuildInfo
- java.lang.Object
-
- com.irurueta.commons.BuildInfo
-
public final class BuildInfo extends java.lang.ObjectContains build data for this library.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringARTIFACT_ID_KEYKey to obtain artifactId of this library from properties file.private static java.lang.StringBRANCH_KEYKey to obtain build branch from properties file.private static java.lang.StringBUILD_INFO_PROPERTIESLocation of properties file that contains build data.private static java.lang.StringBUILD_NUMBER_KEYKey to obtain build number from properties file.private static java.lang.StringBUILD_TIMESTAMP_KEYKey to obtain build timestamp from properties file.private static java.lang.StringCOMMIT_KEYKey to obtain build commit from properties file.private static java.lang.StringGROUP_ID_KEYKey to obtain groupID of this library from properties file.private static java.util.logging.LoggerLOGGERThis class logger.private java.lang.StringmArtifactIdArtifactId of this library.private java.lang.StringmBranchBuild branch.private java.lang.StringmBuildNumberBuild number.private java.util.DatemBuildTimestampBuild timestamp.private java.lang.StringmCommitBuild commit.private java.lang.StringmGroupIdGroupId of this library.private static java.lang.ref.SoftReference<BuildInfo>mReferenceSingleton stored in a soft reference (to keep it cached in memory unless memory is claimed).private java.lang.StringmVersionVersion of this library.private static java.lang.StringTIMESTAMP_FORMATFormat for build timestamp.private static java.lang.StringVERSION_KEYKey to obtain version of this library from properties file.
-
Constructor Summary
Constructors Modifier Constructor Description privateBuildInfo()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetArtifactId()Obtains artifactId of this library.java.lang.StringgetBranch()Obtains build branch.java.lang.StringgetBuildNumber()Obtains build number.java.util.DategetBuildTimestamp()Obtains build timestamp.java.lang.StringgetCommit()Obtains build commit.java.lang.StringgetGroupId()Obtains groupId of this library.static BuildInfogetInstance()Obtains singleton instance.java.lang.StringgetVersion()Obtains version of this library.
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
This class logger.
-
BUILD_INFO_PROPERTIES
private static final java.lang.String BUILD_INFO_PROPERTIES
Location of properties file that contains build data. Build data is stored in this file, which is modified each time that compilation is run in the CI server.- See Also:
- Constant Field Values
-
BUILD_TIMESTAMP_KEY
private static final java.lang.String BUILD_TIMESTAMP_KEY
Key to obtain build timestamp from properties file.- See Also:
- Constant Field Values
-
GROUP_ID_KEY
private static final java.lang.String GROUP_ID_KEY
Key to obtain groupID of this library from properties file.- See Also:
- Constant Field Values
-
ARTIFACT_ID_KEY
private static final java.lang.String ARTIFACT_ID_KEY
Key to obtain artifactId of this library from properties file.- See Also:
- Constant Field Values
-
VERSION_KEY
private static final java.lang.String VERSION_KEY
Key to obtain version of this library from properties file.- See Also:
- Constant Field Values
-
BUILD_NUMBER_KEY
private static final java.lang.String BUILD_NUMBER_KEY
Key to obtain build number from properties file.- See Also:
- Constant Field Values
-
COMMIT_KEY
private static final java.lang.String COMMIT_KEY
Key to obtain build commit from properties file.- See Also:
- Constant Field Values
-
BRANCH_KEY
private static final java.lang.String BRANCH_KEY
Key to obtain build branch from properties file.- See Also:
- Constant Field Values
-
TIMESTAMP_FORMAT
private static final java.lang.String TIMESTAMP_FORMAT
Format for build timestamp.- See Also:
- Constant Field Values
-
mReference
private static java.lang.ref.SoftReference<BuildInfo> mReference
Singleton stored in a soft reference (to keep it cached in memory unless memory is claimed).
-
mBuildTimestamp
private java.util.Date mBuildTimestamp
Build timestamp.
-
mGroupId
private java.lang.String mGroupId
GroupId of this library.
-
mArtifactId
private java.lang.String mArtifactId
ArtifactId of this library.
-
mVersion
private java.lang.String mVersion
Version of this library.
-
mBuildNumber
private java.lang.String mBuildNumber
Build number.
-
mCommit
private java.lang.String mCommit
Build commit.
-
mBranch
private java.lang.String mBranch
Build branch.
-
-
Method Detail
-
getInstance
public static BuildInfo getInstance()
Obtains singleton instance.- Returns:
- singleton instance.
-
getBuildTimestamp
public java.util.Date getBuildTimestamp()
Obtains build timestamp.- Returns:
- build timestamp.
-
getGroupId
public java.lang.String getGroupId()
Obtains groupId of this library.- Returns:
- groupId of this library.
-
getArtifactId
public java.lang.String getArtifactId()
Obtains artifactId of this library.- Returns:
- artifactId of this library.
-
getVersion
public java.lang.String getVersion()
Obtains version of this library.- Returns:
- version of this library.
-
getBuildNumber
public java.lang.String getBuildNumber()
Obtains build number.- Returns:
- build number.
-
getCommit
public java.lang.String getCommit()
Obtains build commit.- Returns:
- build commit.
-
getBranch
public java.lang.String getBranch()
Obtains build branch.- Returns:
- build branch.
-
-