public final class PropertyResolver extends Object
Model then the expression should use '.object' to work with
its value. | Modifier and Type | Method and Description |
|---|---|
static void |
destroy(Object application)
Clean up cache for this app.
|
static <T> Class<T> |
getPropertyClass(String expression,
Class<?> clz)
Gets the property class.
|
static Class<?> |
getPropertyClass(String expression,
Object object)
Gets the property class.
|
static Field |
getPropertyField(String expression,
Object object)
Gets the property field.
|
static Method |
getPropertyGetter(String expression,
Object object)
Gets the property getter.
|
static Method |
getPropertySetter(String expression,
Object object)
Gets the property setter.
|
static Object |
getValue(String expression,
Object object)
Looks up the value from the object with the given expression.
|
static CharSequence |
replaceAll(CharSequence s,
CharSequence searchFor,
CharSequence replaceWith)
Replace all occurrences of one string replaceWith another string.
|
static void |
setClassCache(Object application,
de.alpharogroup.model.api.ClassCache classCache)
Sets the
ClassCache for the given application. |
static void |
setValue(String expression,
Object object,
Object value)
Set the value on the object with the given expression.
|
public static void destroy(Object application)
application - the applicationpublic static <T> Class<T> getPropertyClass(String expression, Class<?> clz)
T - the generic typeexpression - the expressionclz - the classRuntimeException - if class cannot be resolvedpublic static final Class<?> getPropertyClass(String expression, Object object)
expression - the expressionobject - the objectRuntimeException - if the cannot be resolvedpublic static final Field getPropertyField(String expression, Object object)
expression - the expressionobject - the objectRuntimeException - if there is no such fieldpublic static final Method getPropertyGetter(String expression, Object object)
expression - the expressionobject - the objectRuntimeException - if there is no getter methodpublic static final Method getPropertySetter(String expression, Object object)
expression - the expressionobject - the objectRuntimeException - if there is no setter methodpublic static final Object getValue(String expression, Object object)
expression - The expression string with the property to be lookup.object - The object which is evaluated.public static CharSequence replaceAll(CharSequence s, CharSequence searchFor, CharSequence replaceWith)
s - The string to processsearchFor - The value to search forreplaceWith - The value to searchFor replaceWithpublic static void setClassCache(Object application, de.alpharogroup.model.api.ClassCache classCache)
ClassCache for the given application.
If the Application is null then it will be the default if no application is found. So if you
want to be sure that your ClassCache is handled in all situations then call this
method twice with your implementations. One time for the application and the second time with
null.application - to use or null if the default must be set.classCache - the class cachepublic static final void setValue(String expression, Object object, Object value)
expression - The expression string with the property to be set.object - The object which is evaluated to set the value on.value - The value to set.RuntimeException - is thrown if expression is empty or the object is null or the setter could not be
foundCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.