public class MethodWrap extends Object implements InterceptorChain, MethodHolder
| 限定符 | 构造器和说明 |
|---|---|
protected |
MethodWrap(Method m) |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
doIntercept(Object obj,
Object[] args)
拦截传递(target、args 是动态的,所以用参数传递;其它部分可以固化)
|
static MethodWrap |
get(Method method) |
<T extends Annotation> |
getAnnotation(Class<T> type)
获取函数某种注解
|
Annotation[] |
getAnnotations()
获取函数所有注解
|
Method |
getMethod()
获取函数本身
|
String |
getName()
获取函数名
|
ParamWrap[] |
getParamWraps()
获取函数参数
|
Class<?> |
getReturnType()
获取函数反回类型
|
Object |
invoke(Object obj,
Object[] args)
执行
|
Object |
invokeByAspect(Object obj,
Object[] args)
执行切面
|
MethodHolder |
method()
方法容器
|
protected MethodWrap(Method m)
public static MethodWrap get(Method method)
public String getName()
public Method getMethod()
getMethod 在接口中 MethodHolderpublic Class<?> getReturnType()
getReturnType 在接口中 MethodHolderpublic ParamWrap[] getParamWraps()
getParamWraps 在接口中 MethodHolderpublic Annotation[] getAnnotations()
getAnnotations 在接口中 MethodHolderpublic <T extends Annotation> T getAnnotation(Class<T> type)
getAnnotation 在接口中 MethodHolderpublic MethodHolder method()
InterceptorChainmethod 在接口中 InterceptorChainpublic Object doIntercept(Object obj, Object[] args) throws Exception
InterceptorChaindoIntercept 在接口中 InterceptorChainobj - 目标对象args - 参数ExceptionCopyright © 2021. All rights reserved.