类 ReflectiveMethodCallUtil
- java.lang.Object
-
- proguard.evaluation.value.ReflectiveMethodCallUtil
-
@Deprecated public class ReflectiveMethodCallUtil extends java.lang.Object已过时。This logic is now implemented inReflectionExecutorThisReflectiveMethodCallUtilcan 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.
-
-
构造器概要
构造器 构造器 说明 ReflectiveMethodCallUtil()已过时。
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static java.lang.ObjectcallConstructor(java.lang.String className, java.lang.Class<?>[] parameterClasses, java.lang.Object[] parameterObjects)已过时。Reflectively call the constructor of className with the given parameters.static java.lang.ObjectcallMethod(java.lang.String className, java.lang.String methodName, java.lang.Object instance, java.lang.Class<?>[] parameterClasses, java.lang.Object[] parameterObjects)已过时。Reflectively call the method on the given instance.static java.lang.Class<?>getClassForArray(java.lang.String internalArrayType)已过时。static java.lang.Class<?>getClassForPrimitive(char internalPrimitiveType)已过时。Returns the Class for the given primitive type.static java.lang.ObjectgetObjectForValue(Value value, java.lang.Class<?> expectedType)已过时。Extract the Object from the given Value.static java.lang.Class<?>[]stringtypesToClasses(java.lang.String descriptor)已过时。Reflectively converts a method descriptor to a list of Classes representing this String.
-
-
-
方法详细资料
-
stringtypesToClasses
public static java.lang.Class<?>[] stringtypesToClasses(java.lang.String descriptor) throws java.lang.ClassNotFoundException已过时。Reflectively converts a method descriptor to a list of Classes representing this String.- 抛出:
java.lang.ClassNotFoundException- if one of the referenced classes (as string) is not part of the current class pool.
-
getObjectForValue
public static java.lang.Object getObjectForValue(Value value, java.lang.Class<?> expectedType)
已过时。Extract the Object from the given Value.- 参数:
value- the value holding the object.expectedType- the class the returned object should be.- 返回:
- an object extracted from the value, or null if it could not be extracted.
-
getClassForArray
public static java.lang.Class<?> getClassForArray(java.lang.String internalArrayType)
已过时。
-
getClassForPrimitive
public static java.lang.Class<?> getClassForPrimitive(char internalPrimitiveType)
已过时。Returns the Class for the given primitive type.
-
callConstructor
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已过时。Reflectively call the constructor of className with the given parameters.- 抛出:
java.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.InstantiationException
-
callMethod
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已过时。Reflectively call the method on the given instance. Instance can be null for static methods.- 抛出:
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionjava.lang.NoSuchMethodExceptionjava.lang.ClassNotFoundException
-
-