Improved templates.
This commit is contained in:
parent
eb907c33fa
commit
77a1b1cf14
3 changed files with 71 additions and 5 deletions
33
examples/java/example.mustache
Normal file
33
examples/java/example.mustache
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
package {{packageName}};
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public final class {{className}} {
|
||||
public final static String PROJECT = "{{project}}";
|
||||
public final static Date BUILDDATE = new Date({{epoch}}L);
|
||||
public final static int MAJOR = {{major}};
|
||||
public final static int MINOR = {{minor}};
|
||||
public final static int PATCH = {{patch}};
|
||||
public final static String PRERELEASE = "{{preRelease}}";
|
||||
public final static String BUILDMETA = "{{buildMeta}}";
|
||||
|
||||
/**
|
||||
* The full semantic version string.
|
||||
*/
|
||||
public final static String VERSION = Integer.toString(MAJOR) + '.'
|
||||
+ Integer.toString(MINOR) + '.'
|
||||
+ Integer.toString(PATCH)
|
||||
+ ((!PRERELEASE.isEmpty()) ? "-" + PRERELEASE : "")
|
||||
+ ((!BUILDMETA.isEmpty()) ? "+" + BUILDMETA : "");
|
||||
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private {{className}}() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue