org.nutz.ioc.aop.config.impl.AnnotationAopConfigration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nutz Show documentation
Show all versions of nutz Show documentation
Nutz, which is a collections of lightweight frameworks, each of them can be used independently
package org.nutz.ioc.aop.config.impl;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.nutz.aop.MethodInterceptor;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.aop.SimpleAopMaker;
/**
* 通过扫描@Aop标注过的Method判断需要拦截哪些方法
*
* @author wendal([email protected])
*
*/
public class AnnotationAopConfigration extends SimpleAopMaker {
public List extends MethodInterceptor> makeIt(Aop t, Method method, Ioc ioc) {
List list = new ArrayList();
for (String name : t.value()) {
list.add(ioc.get(MethodInterceptor.class, name));
}
return list;
}
}