⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buildinfo.java

📁 jbpm的demo,带有流程设计
💻 JAVA
字号:
/** * $Source: /home/ws/rz65/CVS-Repository/WorkflowProjects/JBPM-Demo/src/java/jbpmdemo/util/BuildInfo.java,v $ * $Revision: 1.1 $ * $Date: 2005/03/05 12:16:31 $ * $Author: rz65 $ * * Copyright (c) 2005 Universitaet Karlsruhe (TH) / Rechenzentrum (RZ-UNI-UKA) * * RZ-UNI-KA makes no representations or warranties about the suitability * of this software, either express or implied, including but not limited * to the implied warranties of merchantability, fitness for a particular * purpose, or non-infringement. RZ-UNI-KA shall not be liable for any * damages as a result of using, modifying or distributing this software * or its derivatives. */package jbpmdemo.util;import java.util.MissingResourceException;import java.util.ResourceBundle;import jbpmdemo.logging.LoggableObject;import jbpmdemo.util.UtilConstants;/** * This is a class that provides build information. The build information is * created on the fly when the software is compiled. It is stored as property * resource bundle file in the class path, e.g. the jar archive. *  * <p> *  * @version $Revision: 1.1 $ * @author mailto:harald.meyer@rz.uni-karlsruhe.de */public class BuildInfo extends LoggableObject implements UtilConstants {	/**	 * Returns the singleton reference. The first call to this method will	 * instantiate the singleton; the following call will return the result of	 * the first call.	 * 	 * @return The singleton reference.	 */	public static BuildInfo getInstance() {		if (singleton == null)			new BuildInfo();		return singleton;	}	// the singleton	private static BuildInfo singleton = null;	/**	 * The private constructor. Because of the "private" attribute, clients	 * cannot directly create instances of this class. This prevents any	 * multiple creation of instances.	 */	private BuildInfo() {		super();		singleton = this;		debug(MN_INIT, "singleton creation...");		bundle = ResourceBundle.getBundle(getClass().getName());		debug(MN_INIT, "got bundle: " + bundle);		projectName = b2s("projectName");		projectVersion = b2s("projectVersion");		buildNumber = b2s("buildNumber");		buildDate = b2s("buildDate");		buildJavaVersion = b2s("buildJavaVersion");		buildOSName = b2s("buildOSName");		buildHost = b2s("buildHost");		buildUser = b2s("buildUser");	}	private ResourceBundle bundle;	private String b2s(String key) {		String mn = "b2s";		String result = "N/A";		try {			result = bundle.getString(key);			debug(mn, "resource: " + key + " => " + result);		} catch (MissingResourceException mre) {			error(mn, "Unable to get resource for key " + key, mre);		}		return result;	}	private String projectName;	/**	 * Returns the project name of the Ant run that created this version of the	 * program.	 * 	 * @return The project name.	 */	public String getProjectName() {		String mn = "getProjectName";		debug(mn, "result: " + projectName);		return projectName;	}	private String projectVersion;	/**	 * Returns the project version of the Ant run that created this version of	 * the program.	 * 	 * @return The project version.	 */	public String getProjectVersion() {		String mn = "getProjectVersion";		debug(mn, "result: " + projectVersion);		return projectVersion;	}	private String buildNumber;	/**	 * Returns the build number of the Ant run that created this version of the	 * program.	 * 	 * @return The build number.	 */	public String getBuildNumber() {		String mn = "getBuildNumber";		debug(mn, "result: " + buildNumber);		return buildNumber;	}	private String buildDate;	/**	 * Returns the build date of the Ant run that created this version of the	 * program.	 * 	 * @return The build date.	 */	public String getBuildDate() {		String mn = "getBuildDate";		debug(mn, "result: " + buildDate);		return buildDate;	}	private String buildUser;	/**	 * Returns the build user of the Ant run that created this version of the	 * program.	 * 	 * @return The build user.	 */	public String getBuildUser() {		String mn = "getBuildUser";		debug(mn, "result: " + buildUser);		return buildUser;	}	private String buildHost;	/**	 * Returns the build host of the Ant run that created this version of the	 * program.	 * 	 * @return The build host.	 */	public String getBuildHost() {		String mn = "getBuildHost";		debug(mn, "result: " + buildHost);		return buildHost;	}	private String buildOSName;	/**	 * Returns the build operating system of the Ant run that created this	 * version of the program.	 * 	 * @return The build OS name.	 */	public String getBuildOSName() {		String mn = "getBuildOSName";		debug(mn, "result: " + buildOSName);		return buildOSName;	}	private String buildJavaVersion;	/**	 * Returns the build java version of the Ant run that created this version	 * of the program.	 * 	 * @return The build java version.	 */	public String getBuildJavaVersion() {		String mn = "getBuildJavaVersion";		debug(mn, "result: " + buildJavaVersion);		return buildJavaVersion;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -