Package org.nutz.ioc.aop.config

Examples of org.nutz.ioc.aop.config.InterceptorPair


  public List<InterceptorPair> getInterceptorPairList(Ioc ioc, Class<?> clazz) {
    List<InterceptorPair> ipList = new ArrayList<InterceptorPair>();
    for (AopConfigrationItem aopItem : aopItemList) {
      if (aopItem.matchClassName(clazz.getName()))
        ipList.add(new InterceptorPairgetMethodInterceptorioc,
                                    aopItem.getInterceptor(),
                                    aopItem.isSingleton()),
                        MethodMatcherFactory.matcher(aopItem.getMethodName())));
    }
    return ipList;
View Full Code Here


    if (aops.size() < 1)
      return ipList;
    for (Method m : aops) {
      MethodMatcher mm = new SimpleMethodMatcher(m);
      for (String nm : m.getAnnotation(Aop.class).value())
        ipList.add(new InterceptorPair(ioc.get(MethodInterceptor.class, nm), mm));
    }
    return ipList;
  }
View Full Code Here

                try {
                    Method setter = mirror
                            .getSetter(mirror.getField(fieldName));
                    LazyMethodInterceptor lmi = new LazyMethodInterceptor(
                            setter, fieldName);
                    interceptorPairs.add(new InterceptorPair(lmi,
                            MethodMatcherFactory.matcher("^(get|set)"
                                    + Strings.capitalize(fieldName) + "$")));
                } catch (Throwable e) {
                    if (log.isWarnEnabled())
                        log.warn("Not setter found for LazyLoading ?!", e);
View Full Code Here

    public List<InterceptorPair> getInterceptorPairList(Ioc ioc, Class<?> clazz) {
        List<InterceptorPair> ipList = new ArrayList<InterceptorPair>();
        for (AopConfigrationItem aopItem : aopItemList) {
            if (aopItem.matchClassName(clazz.getName()))
                ipList.add(new InterceptorPair(    getMethodInterceptor(    ioc,
                                                                        aopItem.getInterceptor(),
                                                                        aopItem.isSingleton()),
                                                MethodMatcherFactory.matcher(aopItem.getMethodName())));
        }
        return ipList;
View Full Code Here

        if (aops.size() < 1)
            return ipList;
        for (Method m : aops) {
            MethodMatcher mm = new SimpleMethodMatcher(m);
            for (String nm : m.getAnnotation(Aop.class).value())
                ipList.add(new InterceptorPair(ioc.get(MethodInterceptor.class, nm), mm));
        }
        return ipList;
    }
View Full Code Here

                String fieldName = lf.getName();
                try {
                    Method setter = mirror.getSetter(mirror.getField(fieldName));
                    LazyMethodInterceptor lmi = new LazyMethodInterceptor(setter,
                                                                          fieldName);
                    interceptorPairs.add(new InterceptorPair(lmi,
                                                             MethodMatcherFactory.matcher("^(get|set)"
                                                                                          + Strings.upperFirst(fieldName)
                                                                                          + "$")));
                }
                catch (Throwable e) {
View Full Code Here

TOP

Related Classes of org.nutz.ioc.aop.config.InterceptorPair

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.