Package org.eweb4j.mvc.interceptor

Examples of org.eweb4j.mvc.interceptor.Interceptor


      cls = Class.forName(clsName);

      if (cls == null)
        return false;

      Interceptor interAnn = cls.getAnnotation(Interceptor.class);
      if (interAnn == null)
        return false;
      Uri[] uris = interAnn.uri();
      if (uris == null || uris.length == 0)
        return false;
     
      InterConfigBean inter = new InterConfigBean();
      String name = "".equals(interAnn.name()) ? cls.getSimpleName() : interAnn.name();
      inter.setName(name);
      inter.setClazz(cls.getName());
      inter.setMethod(interAnn.method());
      String[] except = interAnn.except();
      if (except != null && except.length > 0){
        List<String> list = Arrays.asList(except);
        inter.setExcept(new ArrayList<String>(list));
      }
     
      inter.setPolicy(interAnn.policy());
      inter.setType(interAnn.type());
      inter.setPriority(String.valueOf(interAnn.priority()));
      Singleton sin = cls.getAnnotation(Singleton.class);
      if (sin != null)
        inter.setScope("singleton");
      else
        inter.setScope("prototype");
View Full Code Here

TOP

Related Classes of org.eweb4j.mvc.interceptor.Interceptor

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.