类 ReflectiveMethodCallUtil


  • @Deprecated
    public class ReflectiveMethodCallUtil
    extends java.lang.Object
    已过时。
    This logic is now implemented in ReflectionExecutor
    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.
    • 方法概要

      所有方法 静态方法 具体方法 已过时的方法 
      修饰符和类型 方法 说明
      static java.lang.Object callConstructor​(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.Object callMethod​(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.Object getObjectForValue​(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.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • ReflectiveMethodCallUtil

        public ReflectiveMethodCallUtil()
        已过时。
    • 方法详细资料

      • 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.ClassNotFoundException
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        java.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.InvocationTargetException
        java.lang.IllegalAccessException
        java.lang.NoSuchMethodException
        java.lang.ClassNotFoundException