Package edu.gvsu.kurmasz.warszawa.util
Class BuildInfo
java.lang.Object
edu.gvsu.kurmasz.warszawa.util.BuildInfo
public class BuildInfo
extends java.lang.Object
Build information about a package, including version number and build date.
This class relies on the build info being stored in a properties file with a known
name. (One way to do this is to have ant update the file.)
- Author:
- Zachary Kurmas
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBuildInfo.InvalidBuildInfoFileException thrown when either the properties file won't parse, or the date in the properties file won't parse -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_RESOURCE_NAME -
Method Summary
Modifier and Type Method Description java.util.DategetBuildDate()java.lang.StringgetVersion()static BuildInfomake(java.lang.Class<? extends java.lang.Object> c)Loads the default resource for the class' package and returns aBuildInfoobject representing data stored in the resource.static BuildInfomake(java.lang.String resource, java.lang.Class<? extends java.lang.Object> c)Loads the specified resource for the class' package and returns aBuildInfoobject representing data stored in the resource.
-
Field Details
-
DEFAULT_RESOURCE_NAME
public static final java.lang.String DEFAULT_RESOURCE_NAME- See Also:
- Constant Field Values
-
-
Method Details
-
getBuildDate
public java.util.Date getBuildDate() -
getVersion
public java.lang.String getVersion() -
make
public static BuildInfo make(java.lang.String resource, java.lang.Class<? extends java.lang.Object> c)Loads the specified resource for the class' package and returns aBuildInfoobject representing data stored in the resource. Obtained from Sun's Java Forum- Parameters:
resource- the resource containing the build datec- A class in the package containing the resource- Returns:
- a
BuildInfoobject containing the information stored in the resource, ornullif the resource can't be found.
-
make
Loads the default resource for the class' package and returns aBuildInfoobject representing data stored in the resource. Obtained from Sun's Java Forum- Parameters:
c- A class in the package containing the resource- Returns:
- a
BuildInfoobject containing the information stored in the resource, ornullif the resource can't be found.
-