详解invoke方法
publicObjectinvoke(MethodInvocationm)throwsThrowable{//TODOAddyourcodeshereif(impleme...
public Object invoke(MethodInvocation m) throws Throwable {
// TODO Add your codes here
if(implementsInterface(m.getMethod().getDeclaringClass())){
return m.getMethod().invoke(this,m.getArguments());
//invoke introduced mthod,here is IAuditable
}else{
return m.proceed(); //delegate other method
} 展开
// TODO Add your codes here
if(implementsInterface(m.getMethod().getDeclaringClass())){
return m.getMethod().invoke(this,m.getArguments());
//invoke introduced mthod,here is IAuditable
}else{
return m.proceed(); //delegate other method
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询