parent
8fd09d8aef
commit
632115eefe
@ -0,0 +1,56 @@ |
|||||||
|
package de.kreth.invoice; |
||||||
|
|
||||||
|
import java.util.Properties; |
||||||
|
import java.util.ResourceBundle; |
||||||
|
import java.util.function.UnaryOperator; |
||||||
|
|
||||||
|
import javax.annotation.processing.Generated; |
||||||
|
|
||||||
|
/** |
||||||
|
* Property keys from version.properties |
||||||
|
*/ |
||||||
|
@Generated(date = "29.05.2022, 21:56:35", value = "de.kreth.property2java.Generator") |
||||||
|
public enum Version_Properties { |
||||||
|
|
||||||
|
/** |
||||||
|
* project.version = "${project.version}" |
||||||
|
*/ |
||||||
|
PROJECT_VERSION ("project.version"), |
||||||
|
/** |
||||||
|
* package_name = "${project.artifactId}-${project.version}.${project.packaging}" |
||||||
|
*/ |
||||||
|
PACKAGE_NAME ("package_name"), |
||||||
|
/** |
||||||
|
* build.dateTime = "${timestamp}" |
||||||
|
*/ |
||||||
|
BUILD_DATETIME ("build.dateTime"), |
||||||
|
/** |
||||||
|
* project.artifactId = "${project.artifactId}" |
||||||
|
*/ |
||||||
|
PROJECT_ARTIFACTID ("project.artifactId"); |
||||||
|
|
||||||
|
private final String value; |
||||||
|
|
||||||
|
private Version_Properties (String value) { |
||||||
|
this.value = value; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Represented Key in property File. |
||||||
|
* @return key |
||||||
|
*/ |
||||||
|
public String getValue() { |
||||||
|
return value; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Resolves the value for this key from the parameter function. |
||||||
|
* <p> |
||||||
|
* e.g. <code>Version_Properties.getString(resBundle::getString)</code> |
||||||
|
* @param resourceFunction {@link Properties#getProperty(String)} or {@link ResourceBundle#getString(String)} |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public String getString(UnaryOperator<String> resourceFunction) { |
||||||
|
return resourceFunction.apply(value); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,4 @@ |
|||||||
|
project.artifactId=trainerinvoice |
||||||
|
project.version=1.0.0-SNAPSHOT |
||||||
|
build.dateTime=2022-05-29 23:00:00 |
||||||
|
package_name=trainerinvoice-1.0.0-SNAPSHOT.jar |
||||||
Loading…
Reference in new issue