Package com.rvandoosselaer.jmeutils
Class ApplicationProperties
- java.lang.Object
-
- com.rvandoosselaer.jmeutils.ApplicationProperties
-
public class ApplicationProperties extends java.lang.ObjectA singleton helper implementation that loads a properties file and exposes some methods to retrieve type casted values from the file. This class will load the file specified in the 'application.configurationFile' property. When this property isn't found, it will try to load an 'application.properties' file in the root of the classpath. Example: -Dapplication.configurationFile=/home/user/custom.properties This will try to find the file '/home/user/custom.properties' on the filesystem.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget(java.lang.String key, boolean fallback)intget(java.lang.String key, int fallback)java.lang.Stringget(java.lang.String key, java.lang.String fallback)static ApplicationPropertiesgetInstance()
-
-
-
Method Detail
-
getInstance
public static ApplicationProperties getInstance()
-
get
public java.lang.String get(java.lang.String key, java.lang.String fallback)
-
get
public boolean get(java.lang.String key, boolean fallback)
-
get
public int get(java.lang.String key, int fallback)
-
-