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) |
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.Copyright © 2015. All rights reserved.