public class PropertyHelper extends Object
| Constructor and Description |
|---|
PropertyHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyProperties(Object configuration,
Map<String,String> properties)
Sets an objects fields via reflection from String values.
|
static void |
applyProperty(Object configuration,
String key,
String stringValue) |
static Object |
convertToClass(String value,
Class<?> clazz)
Converts a value to the type of the given field.
|
static boolean |
getBooleanProperty(Map<String,String> properties,
String name,
boolean defaultValue) |
static String |
resolveProperty(Properties props,
String original)
Replaces Ant-style property references if the corresponding keys exist in the provided
Properties. |
public static boolean getBooleanProperty(Map<String,String> properties, String name, boolean defaultValue)
public static Object convertToClass(String value, Class<?> clazz)
value - field - public static void applyProperty(Object configuration, String key, String stringValue)
public static void applyProperties(Object configuration, Map<String,String> properties)
configuration - properties - ProcessEngineException - if a property is supplied that matches no field or
if the field's type is not String, nor int, nor boolean.public static String resolveProperty(Properties props, String original)
Properties.props - contains possible replacementsoriginal - may contain Ant-style templatesCopyright © 2022. All rights reserved.