com.ibm.as400.access.BuildInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jt400 Show documentation
Show all versions of jt400 Show documentation
The Open Source version of the IBM Toolbox for Java
The newest version!
package com.ibm.as400.access;
import java.text.SimpleDateFormat;
// This class is merely an input template to an autogenerated source class
// See use of maven-replacer-plugin in the project manifests
public class BuildInfo {
static String s_compileDateTime = "2024-12-15 15:16:32 (GMT)";
static String s_jtopenVersion = "20.0.8";
static boolean s_isDevelopmentBuild = !Boolean.valueOf("true");
public static boolean isDevelopmentBuild() {
return s_isDevelopmentBuild;
}
public static String getVersion() {
String devBuildSuffix = isDevelopmentBuild() ? " (development build)" : "";
String v = s_jtopenVersion;
if (v.startsWith("@")) {
return ""+devBuildSuffix;
}
return v.trim().replaceFirst("^v", "")+devBuildSuffix;
}
public static String getTimestampString() {
String ts = s_compileDateTime;
if (ts.startsWith("@")) {
return "";
}
return ts.trim();
}
public static String getTimestampYear() {
try {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return ""+ fmt.parse("2024-12-15 15:16:32").getYear() + 1900;
} catch(Exception e) {
return "";
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy