Package org.jrest4guice.jndi.annotations

Examples of org.jrest4guice.jndi.annotations.JndiResource


    List<Module> modules = new ArrayList<Module>(0);
    modules.add(new Module() {
      @Override
      public void configure(Binder binder) {
        Field[] fields;
        JndiResource annotation;
        Class type;
        Class<JndiResource> _clazz = JndiResource.class;
        for (Class<?> clazz : classes) {
          fields = clazz.getDeclaredFields();
          for(Field f: fields){
            if(f.isAnnotationPresent(_clazz)){
              annotation = f.getAnnotation(_clazz);
              type = f.getType();
              binder.bind(type).annotatedWith(_clazz).toProvider(JndiProvider.fromJndi(type,annotation.jndi()));
            }
          }
        }     
      }
    });
View Full Code Here

TOP

Related Classes of org.jrest4guice.jndi.annotations.JndiResource

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.