Package proguard.evaluation.value
Class ReflectiveMethodCallUtil
java.lang.Object
proguard.evaluation.value.ReflectiveMethodCallUtil
Deprecated.
This
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcallConstructor(String className, Class<?>[] parameterClasses, Object[] parameterObjects) Deprecated.Reflectively call the constructor of className with the given parameters.static ObjectcallMethod(String className, String methodName, Object instance, Class<?>[] parameterClasses, Object[] parameterObjects) Deprecated.Reflectively call the method on the given instance.static Class<?>getClassForArray(String internalArrayType) Deprecated.static Class<?>getClassForPrimitive(char internalPrimitiveType) Deprecated.Returns the Class for the given primitive type.static ObjectgetObjectForValue(Value value, Class<?> expectedType) Deprecated.Extract the Object from the given Value.static Class<?>[]stringtypesToClasses(String descriptor) Deprecated.Reflectively converts a method descriptor to a list of Classes representing this String.
-
Constructor Details
-
ReflectiveMethodCallUtil
public ReflectiveMethodCallUtil()Deprecated.
-
-
Method Details
-
stringtypesToClasses
Deprecated.Reflectively converts a method descriptor to a list of Classes representing this String.- Throws:
ClassNotFoundException- if one of the referenced classes (as string) is not part of the current class pool.
-
getObjectForValue
Deprecated.Extract the Object from the given Value.- Parameters:
value- the value holding the object.expectedType- the class the returned object should be.- Returns:
- an object extracted from the value, or null if it could not be extracted.
-
getClassForArray
Deprecated. -
getClassForPrimitive
Deprecated.Returns the Class for the given primitive type. -
callConstructor
public static Object callConstructor(String className, Class<?>[] parameterClasses, Object[] parameterObjects) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException Deprecated.Reflectively call the constructor of className with the given parameters. -
callMethod
public static Object callMethod(String className, String methodName, Object instance, Class<?>[] parameterClasses, Object[] parameterObjects) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException, ClassNotFoundException Deprecated.Reflectively call the method on the given instance. Instance can be null for static methods.
-
ReflectionExecutor