Package net.csdn.annotation

Examples of net.csdn.annotation.Service


                        bind(clzz).in(Scopes.SINGLETON);
                    }
                });
                continue;
            }
            final Service service = (Service) clzz.getAnnotation(Service.class);

            if (service == null) continue;
            if (clzz.isInterface() && service.implementedBy() == null)
                throw new AnnotationException(format("{} no implemented class configured", clzz.getName()));

            moduleList.add(new AbstractModule() {
                @Override
                protected void configure() {
                    if (clzz.isInterface()) {
                        logger.info("load  service with @Service => " + clzz.getName() + " to " + service.implementedBy().getName() + " in " + service.value().getName());
                        bind(clzz).to(service.implementedBy()).in(service.value());
                    } else {
                        logger.info("load  service with @Service => " + clzz.getName() + " in " + service.value().getName());
                        bind(clzz).in(service.value());
                    }

                }
            });
        }
View Full Code Here

TOP

Related Classes of net.csdn.annotation.Service

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.