ReflectionExecutor
@Deprecated
public class ReflectiveMethodCallUtil
extends java.lang.Object
ReflectiveMethodCallUtil
can execute a method call on a given class reflectively. If
the call fails, a RuntimeException is thrown, otherwise, a new Value is returned using the given
factory.Constructor and Description |
---|
ReflectiveMethodCallUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
callConstructor(java.lang.String className,
java.lang.Class<?>[] parameterClasses,
java.lang.Object[] parameterObjects)
Deprecated.
Reflectively call the constructor of className with the given parameters.
|
static java.lang.Object |
callMethod(java.lang.String className,
java.lang.String methodName,
java.lang.Object instance,
java.lang.Class<?>[] parameterClasses,
java.lang.Object[] parameterObjects)
Deprecated.
Reflectively call the method on the given instance.
|
static java.lang.Class<?> |
getClassForArray(java.lang.String internalArrayType)
Deprecated.
|
static java.lang.Class<?> |
getClassForPrimitive(char internalPrimitiveType)
Deprecated.
Returns the Class for the given primitive type.
|
static java.lang.Object |
getObjectForValue(Value value,
java.lang.Class<?> expectedType)
Deprecated.
Extract the Object from the given Value.
|
static java.lang.Class<?>[] |
stringtypesToClasses(java.lang.String descriptor)
Deprecated.
Reflectively converts a method descriptor to a list of Classes representing this String.
|
public static java.lang.Class<?>[] stringtypesToClasses(java.lang.String descriptor) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if one of the referenced classes (as string) is not part of the
current class pool.public static java.lang.Object getObjectForValue(Value value, java.lang.Class<?> expectedType)
value
- the value holding the object.expectedType
- the class the returned object should be.public static java.lang.Class<?> getClassForArray(java.lang.String internalArrayType)
public static java.lang.Class<?> getClassForPrimitive(char internalPrimitiveType)
public static java.lang.Object callConstructor(java.lang.String className, java.lang.Class<?>[] parameterClasses, java.lang.Object[] parameterObjects) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
public static java.lang.Object callMethod(java.lang.String className, java.lang.String methodName, java.lang.Object instance, java.lang.Class<?>[] parameterClasses, java.lang.Object[] parameterObjects) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.ClassNotFoundException