BuildInfo
org.clapper.util.misc

Class BuildInfo



  • public class BuildInfoextends Object

    Contains constants for defining and accessing build info. Also acts as a base class for specific packages' classes that retrieve package build data.

    • Field Detail

      • BUILD_OS_KEY

        public static final String BUILD_OS_KEY
        The key to retrieve the operating system where the build occurred.
        See Also:
        Constant Field Values
      • BUILD_COMPILER_KEY

        public static final 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 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 String BUILD_DATE_KEY
        The build date, in "raw" (internal, numeric) form.
        See Also:
        Constant Field Values
      • BUILD_ID_KEY

        public static final 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 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 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(String bundleName)
        Constructor.
        Parameters:
        bundleName - the resource bundle containing the build info
    • Method Detail

      • getBuildDate

        public String getBuildDate()
        Get the build date, as a string, from the resource bundle.
        Returns:
        the build date, as a string
      • getBuildUserID

        public 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 String getBuildOperatingSystem()
        Get the string that identifies the operating system where the build occurred.
        Returns:
        the operating system string
      • getBuildID

        public String getBuildID()
        Get the build ID string.
        Returns:
        the build ID string
      • getBuildJavaVM

        public String getBuildJavaVM()
        Get the string that identifies the Java virtual machine that was used during the build.
        Returns:
        the Java VM string
      • getBuildJavaCompiler

        public String getBuildJavaCompiler()
        Get the Java compiler used during the build.
        Returns:
        the Java compiler string
      • getBuildAntVersion

        public String getBuildAntVersion()
        Get the version of Ant used during the build process.
        Returns:
        the Ant version string
      • makeBuildInfoBundle

        public static void makeBuildInfoBundle(File bundleFile,                       String javaCompiler,                       String antVersion)                                throws IOException
        Update the build bundle file.
        Parameters:
        bundleFile - the path to the properties file
        javaCompiler - Java compiler name, or null if not known
        antVersion - Ant version, or null if not known
        Throws:
        IOException - Can't recreate file.
      • showBuildInfo

        public void showBuildInfo(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(PrintWriter out)
        Display build information to the specified PrintWriter.
        Parameters:
        out - where to write the build information
        See Also:
        showBuildInfo(PrintStream)

SCaVis 1.7 © jWork.org