All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.reprezen.genflow.api.util.GeneratorProperties Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
package com.reprezen.genflow.api.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class GeneratorProperties {

	private static Properties props = new Properties();

	private static final String VERSION_PROP = "version";

	public static String getGenFlowVersion() {
		return getProperties().containsKey(VERSION_PROP) ? props.getProperty(VERSION_PROP) : "unknown";
	}

	private static Properties getProperties() {
		if (props.isEmpty()) {
			try (InputStream propsStream = GeneratorProperties.class.getResourceAsStream("generator.properties")) {
				props.load(propsStream);
			} catch (IOException e) {
			}
		}
		return props;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy