org.clapper.util.misc
Class BuildInfo
- java.lang.Object
-
- org.clapper.util.misc.BuildInfo
-
public class BuildInfo extends java.lang.ObjectContains constants for defining and accessing build info. Also acts as a base class for specific packages' classes that retrieve package build data.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringBUILD_ANT_VERSION_KEYThe key to retrieve the version of Ant used for the build.static java.lang.StringBUILD_COMPILER_KEYThe key to retrieve the compiler used for the build.static java.lang.StringBUILD_DATE_KEYThe build date, in "raw" (internal, numeric) form.static java.lang.StringBUILD_ID_DATE_FORMAT_STRINGThe date format, used with java.text.SimpleDateFormat, used to create the build ID.static java.lang.StringBUILD_ID_KEYThe build ID, really just the time in a compressed format.static java.lang.StringBUILD_OS_KEYThe key to retrieve the operating system where the build occurred.static java.lang.StringBUILD_VM_KEYThe key to retrieve the VM used for the build.static java.lang.StringBUILT_BY_KEYThe user and host where the build occurred.static java.lang.StringDATE_FORMAT_STRINGThe date format, used with java.text.SimpleDateFormat, used to write the date string to the build file.
-
Constructor Summary
Constructors Constructor and Description BuildInfo(java.lang.String bundleName)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetBuildAntVersion()Get the version of Ant used during the build process.java.lang.StringgetBuildDate()Get the build date, as a string, from the resource bundle.java.lang.StringgetBuildID()Get the build ID string.java.lang.StringgetBuildJavaCompiler()Get the Java compiler used during the build.java.lang.StringgetBuildJavaVM()Get the string that identifies the Java virtual machine that was used during the build.java.lang.StringgetBuildOperatingSystem()Get the string that identifies the operating system where the build occurred.java.lang.StringgetBuildUserID()Get the string that identifies the user who built the software.static voidmakeBuildInfoBundle(java.io.File bundleFile, java.lang.String javaCompiler, java.lang.String antVersion)Update the build bundle file.voidshowBuildInfo(java.io.PrintStream out)Display build information to the specified PrintStream.voidshowBuildInfo(java.io.PrintWriter out)Display build information to the specified PrintWriter.
-
-
-
Field Detail
-
BUILD_OS_KEY
public static final java.lang.String BUILD_OS_KEY
The key to retrieve the operating system where the build occurred.- See Also:
- Constant Field Values
-
BUILD_VM_KEY
public static final java.lang.String BUILD_VM_KEY
The key to retrieve the VM used for the build.- See Also:
- Constant Field Values
-
BUILD_COMPILER_KEY
public static final java.lang.String BUILD_COMPILER_KEY
The key to retrieve the compiler used for the build.- See Also:
- Constant Field Values
-
BUILD_ANT_VERSION_KEY
public static final java.lang.String BUILD_ANT_VERSION_KEY
The key to retrieve the version of Ant used for the build.- See Also:
- Constant Field Values
-
BUILD_DATE_KEY
public static final java.lang.String BUILD_DATE_KEY
The build date, in "raw" (internal, numeric) form.- See Also:
- Constant Field Values
-
BUILT_BY_KEY
public static final java.lang.String BUILT_BY_KEY
The user and host where the build occurred.- See Also:
- Constant Field Values
-
BUILD_ID_KEY
public static final java.lang.String BUILD_ID_KEY
The build ID, really just the time in a compressed format.- See Also:
- Constant Field Values
-
DATE_FORMAT_STRING
public static final java.lang.String DATE_FORMAT_STRING
The date format, used with java.text.SimpleDateFormat, used to write the date string to the build file. This format can also be used to parse the date string, if necessary.- See Also:
- Constant Field Values
-
BUILD_ID_DATE_FORMAT_STRING
public static final java.lang.String BUILD_ID_DATE_FORMAT_STRING
The date format, used with java.text.SimpleDateFormat, used to create the build ID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BuildInfo
public BuildInfo(java.lang.String bundleName)
Constructor.- Parameters:
bundleName- the resource bundle containing the build info
-
-
Method Detail
-
getBuildDate
public java.lang.String getBuildDate()
Get the build date, as a string, from the resource bundle.- Returns:
- the build date, as a string
-
getBuildUserID
public java.lang.String getBuildUserID()
Get the string that identifies the user who built the software. Typically, this string contains both the user ID and the host where the build occurred.- Returns:
- the user identification string
-
getBuildOperatingSystem
public java.lang.String getBuildOperatingSystem()
Get the string that identifies the operating system where the build occurred.- Returns:
- the operating system string
-
getBuildID
public java.lang.String getBuildID()
Get the build ID string.- Returns:
- the build ID string
-
getBuildJavaVM
public java.lang.String getBuildJavaVM()
Get the string that identifies the Java virtual machine that was used during the build.- Returns:
- the Java VM string
-
getBuildJavaCompiler
public java.lang.String getBuildJavaCompiler()
Get the Java compiler used during the build.- Returns:
- the Java compiler string
-
getBuildAntVersion
public java.lang.String getBuildAntVersion()
Get the version of Ant used during the build process.- Returns:
- the Ant version string
-
makeBuildInfoBundle
public static void makeBuildInfoBundle(java.io.File bundleFile, java.lang.String javaCompiler, java.lang.String antVersion) throws java.io.IOExceptionUpdate the build bundle file.- Parameters:
bundleFile- the path to the properties filejavaCompiler- Java compiler name, or null if not knownantVersion- Ant version, or null if not known- Throws:
java.io.IOException- Can't recreate file.
-
showBuildInfo
public void showBuildInfo(java.io.PrintStream out)
Display build information to the specified PrintStream.- Parameters:
out- where to write the build information- See Also:
showBuildInfo(PrintWriter)
-
showBuildInfo
public void showBuildInfo(java.io.PrintWriter out)
Display build information to the specified PrintWriter.- Parameters:
out- where to write the build information- See Also:
showBuildInfo(PrintStream)
-
-
DMelt 3.0 © DataMelt by jWork.ORG