public abstract class AbstractReflectionWrapper extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReflectionWrapper(Object instance) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
callReflectedMethod(String methodName,
Class<T> expectedType,
Object... params)
Call a method via reflection on the wrapped instance.
|
protected <T> T |
callReflectedMethod(String methodName,
Class<T> expectedType,
Object[] paramValues,
Class[] paramTypes)
Call a method via reflection on the wrapped instance.
|
protected static Class |
classForName(String className)
Lookup a class for the given class name.
|
boolean |
equals(Object obj) |
protected static <T> T |
executeMethod(Object targetObject,
String methodName,
Class<T> expectedType,
Object... param) |
protected static <T> T |
executeMethod(Object targetObject,
String methodName,
Class<T> expectedType,
Object[] methodParamValues,
Class[] methodParamTypes) |
protected Object |
getInstance()
Get the wrapped instance
|
protected <T> T |
getReflectedJaloProperty(String methodName,
Class<T> expectedType)
Get the value of a jalo layer item property via reflection.
|
int |
hashCode() |
protected <T extends ItemModel> |
modelWrap(Object item)
Convert a jalo item into its equivalent item model.
|
protected AbstractReflectionWrapper(Object instance)
protected Object getInstance()
protected <T> T getReflectedJaloProperty(String methodName, Class<T> expectedType)
T - The parametrised type for the expected return typemethodName - The name of the property getter method.expectedType - The type of the property, must match the return type of the getter method.protected <T> T callReflectedMethod(String methodName, Class<T> expectedType, Object... params)
T - The parametrised type for the expected return typemethodName - the method nameexpectedType - the expected return typeparams - the arguments to the methodprotected <T> T callReflectedMethod(String methodName, Class<T> expectedType, Object[] paramValues, Class[] paramTypes)
T - The parametrised type for the expected return typemethodName - the method nameexpectedType - the expected return typeparamValues - the method parameter valuesparamTypes - the method parameter typesprotected <T extends ItemModel> T modelWrap(Object item)
T - The return type, must extend ItemModel.item - the itemprotected static Class classForName(String className)
className - the class nameprotected static <T> T executeMethod(Object targetObject, String methodName, Class<T> expectedType, Object... param)
Copyright © 2017 SAP SE. All Rights Reserved.