Package ej.property.loader
Class SystemPropertyLoader
- java.lang.Object
-
- ej.property.loader.SystemPropertyLoader
-
- All Implemented Interfaces:
PropertyLoader
public class SystemPropertyLoader extends Object implements PropertyLoader
A property loader that searches in system properties.
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty(String key)Gets the value mapped with the specified key.StringgetProperty(String key, String defaultValue)Gets the value mapped with the specified key or a default value.
-
-
-
Method Detail
-
getProperty
@Nullable public String getProperty(String key)
Description copied from interface:PropertyLoaderGets the value mapped with the specified key.- Specified by:
getPropertyin interfacePropertyLoader- Parameters:
key- the key.- Returns:
- the value of the property, or
nullif the property is not found.
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from interface:PropertyLoaderGets the value mapped with the specified key or a default value.- Specified by:
getPropertyin interfacePropertyLoader- Parameters:
key- the key.defaultValue- the default value.- Returns:
- the value of the property, or the default value if the property is not found.
-
-