public abstract class AbstractReflectionWrapper
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReflectionWrapper(java.lang.Object instance) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
callReflectedMethod(java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object... params)
Call a method via reflection on the wrapped instance.
|
protected <T> T |
callReflectedMethod(java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object[] paramValues,
java.lang.Class[] paramTypes)
Call a method via reflection on the wrapped instance.
|
protected static java.lang.Class |
classForName(java.lang.String className)
Lookup a class for the given class name.
|
boolean |
equals(java.lang.Object obj) |
protected static <T> T |
executeMethod(java.lang.Object targetObject,
java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object... param) |
protected static <T> T |
executeMethod(java.lang.Object targetObject,
java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object[] methodParamValues,
java.lang.Class[] methodParamTypes) |
protected java.lang.Object |
getInstance()
Get the wrapped instance
|
protected <T> T |
getReflectedJaloProperty(java.lang.String methodName,
java.lang.Class<T> expectedType)
Get the value of a jalo layer item property via reflection.
|
int |
hashCode() |
protected <T extends ItemModel> |
modelWrap(java.lang.Object item)
Convert a jalo item into its equivalent item model.
|
protected AbstractReflectionWrapper(java.lang.Object instance)
protected java.lang.Object getInstance()
protected <T> T getReflectedJaloProperty(java.lang.String methodName,
java.lang.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(java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.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(java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object[] paramValues,
java.lang.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(java.lang.Object item)
T - The return type, must extend ItemModel.item - the itempublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected static java.lang.Class classForName(java.lang.String className)
className - the class nameprotected static <T> T executeMethod(java.lang.Object targetObject,
java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object... param)
protected static <T> T executeMethod(java.lang.Object targetObject,
java.lang.String methodName,
java.lang.Class<T> expectedType,
java.lang.Object[] methodParamValues,
java.lang.Class[] methodParamTypes)
Copyright © 2018 SAP SE. All Rights Reserved.