类 MethodProxy
java.lang.Object
cn.taketoday.bytecode.proxy.MethodProxy
Classes generated by
Enhancer pass this object to the registered
MethodInterceptor objects when an intercepted method is invoked. It
can be used to either invoke the original method, or call the same method on
a different object of the same type.- 作者:
- Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private static classprivate static class -
字段概要
字段修饰符和类型字段说明private MethodProxy.CreateInfoprivate MethodProxy.FastClassInfoprivate MethodSignatureprivate MethodSignature -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MethodProxyFor internal use byEnhanceronly; see theMethodAccessclass for similar functionality.static MethodProxyfind(Class type, MethodSignature sig) Return theMethodProxyused when intercepting the method matching the given signature.private static MethodAccesshelper(MethodProxy.CreateInfo ci, Class type) private MethodProxy.FastClassInfoinit()Invoke the original method, on a different object of the same type.invokeSuper(Object obj, Object[] args) Invoke the original (super) method on the specified object.
-
字段详细资料
-
sig1
-
sig2
-
createInfo
-
fastClassInfo
-
-
构造器详细资料
-
MethodProxy
private MethodProxy()
-
-
方法详细资料
-
create
For internal use byEnhanceronly; see theMethodAccessclass for similar functionality. -
init
-
helper
-
find
Return theMethodProxyused when intercepting the method matching the given signature.- 参数:
type- the class generated by Enhancersig- the signature to match- 返回:
- the MethodProxy instance, or null if no applicable matching method is found
- 抛出:
IllegalArgumentException- if the Class was not created by Enhancer or does not use a MethodInterceptor
-
invoke
Invoke the original method, on a different object of the same type.- 参数:
obj- the compatible object; recursion will result if you use the object passed as the first argument to the MethodInterceptor (usually not what you want)args- the arguments passed to the intercepted method; you may substitute a different argument array as long as the types are compatible- 抛出:
Throwable- the bare exceptions thrown by the called method are passed through without wrapping in anInvocationTargetException- 另请参阅:
-
invokeSuper
Invoke the original (super) method on the specified object.- 参数:
obj- the enhanced object, must be the object passed as the first argument to the MethodInterceptorargs- the arguments passed to the intercepted method; you may substitute a different argument array as long as the types are compatible- 抛出:
Throwable- the bare exceptions thrown by the called method are passed through without wrapping in anInvocationTargetException- 另请参阅:
-