类 MethodInvoker
- 所有已实现的接口:
Accessor,Invoker,MethodAccessor
- 直接已知子类:
ReflectiveMethodAccessor
- 从以下版本开始:
- 2019-10-18 22:35
- 作者:
- Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static classstatic class -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MethodInvokerformReflective(Method method) static MethodInvokerformReflective(Method method, boolean handleReflectionException) static MethodInvokerfromMethod(Class<?> beanClass, String name, Class<?>... parameters) Create aMethodInvokerstatic MethodInvokerfromMethod(Method executable) Create aMethodInvokerstatic MethodInvokerfromMethod(Method executable, Class<?> targetClass) Create aMethodInvokerabstract ObjectInvokes the underlying method represented by thisInvokerobject, on the specified object with the specified parameters.
-
字段详细资料
-
method
-
-
构造器详细资料
-
MethodInvoker
-
-
方法详细资料
-
invoke
Invokes the underlying method represented by thisInvokerobject, on the specified object with the specified parameters. Individual parameters are automatically unwrapped to match primitive formal parameters, and both primitive and reference parameters are subject to method invocation conversions as necessary.If the underlying method is static, then the specified
objargument is ignored. It may be null.If the number of formal parameters required by the underlying method is 0, the supplied
argsarray may be of length 0 or null.If the underlying method is static, the class that declared the method is initialized if it has not already been initialized.
If the method completes normally, the value it returns is returned to the caller of invoke; if the value has a primitive type, it is first appropriately wrapped in an object. However, if the value has the type of array of a primitive type, the elements of the array are not wrapped in objects; in other words, an array of primitive type is returned. If the underlying method return type is void, the invocation returns null.
- 指定者:
invoke在接口中Invoker- 参数:
obj- the object the underlying method is invoked fromargs- the arguments used for the method call- 返回:
- the result of dispatching the method represented by
this object on
objwith parametersargs - 抛出:
NullPointerException- if the specified object is null and the method is an instance method.ExceptionInInitializerError- if the initialization provoked by this method fails.
-
getMethod
- 指定者:
getMethod在接口中MethodAccessor
-
fromMethod
Create aMethodInvoker- 参数:
executable- Target Method to invoke- 返回:
MethodInvokersub object
-
fromMethod
Create aMethodInvoker- 参数:
executable- Target Method to invoketargetClass- most specific target class- 返回:
MethodInvokersub object- 从以下版本开始:
- 3.0
-
fromMethod
Create aMethodInvoker- 参数:
beanClass- Bean Classname- Target method to invokeparameters- Target parameters classes- 返回:
MethodInvokersub object- 抛出:
ReflectionException- Thrown when a particular method cannot be found.
-
formReflective
-
formReflective
-