Package org.apache.xbean.finder

Examples of org.apache.xbean.finder.ClassFinder.findAnnotatedClasses()


                if (messageBean.getEjbClass() == null) {
                    messageBean.setEjbClass(beanClass.getName());
                }
            }

            classes = finder.findAnnotatedClasses(ApplicationException.class);
            if (!classes.isEmpty()) {
                if (ejbJar.getAssemblyDescriptor() == null) {
                    ejbJar.setAssemblyDescriptor(new AssemblyDescriptor());
                }
            }
View Full Code Here


            } else if ("plugin".equals(classLoader)) {
                finder = new ClassFinder(getClass().getClassLoader());
            } else {
                throw new MojoFailureException("classLoader attribute must be 'project' or 'plugin'");
            }
            List<Class> classes = finder.findAnnotatedClasses(Command.class);
            if (classes.isEmpty()) {
                throw new MojoFailureException("No command found");
            }

            Map<String, Set<String>> commands = new TreeMap<String, Set<String>>();
View Full Code Here

            logger.debug("loading mbeans using an annotation finder, you should maybe adjust {} system property",
                                            OPENEJB_MBEAN_CLASSES_PROPERTY);
            List<Class<?>> list = Collections.emptyList();
            try {
                ClassFinder mbeanFinder = new ClassFinder(classLoader, true);
                list = mbeanFinder.findAnnotatedClasses(MBean.class);
            } catch (Exception e) {
                logger.error("can't find annotated MBean", e);
            }

            for (Class<?> clazz : list) {
View Full Code Here

            if (!targetFolder.exists()) {
                targetFolder.mkdirs();
            }

            ClassFinder finder = createFinder(classLoader);
            List<Class<?>> classes = finder.findAnnotatedClasses(Command.class);
            if (classes.isEmpty()) {
                throw new MojoFailureException("No command found");
            }
           
            CommandHelpPrinter helpPrinter = FORMAT_DOCBX.equals(format)
View Full Code Here

                }


                for (Class<? extends Annotation> annotation : annotations) {
                    logger.debug("Scanning for @" + annotation.getName());
                    List<Class> list = finder.findAnnotatedClasses(annotation);
                    if (logger.isDebugEnabled()) for (Class clazz : list) {
                        logger.debug("Found " + clazz.getName());
                    }
                   
                    classes.addAll(list);
View Full Code Here

                }

                /*
                 * @Interceptors
                 */
                for (Class<?> interceptorsAnnotatedClass : inheritedClassFinder.findAnnotatedClasses(Interceptors.class)) {
                    Interceptors interceptors = interceptorsAnnotatedClass.getAnnotation(Interceptors.class);
                    EjbJar ejbJar = ejbModule.getEjbJar();
                    for (Class interceptor : interceptors.value()) {
                        if (ejbJar.getInterceptor(interceptor.getName()) == null) {
                            ejbJar.addInterceptor(new Interceptor(interceptor.getName()));
View Full Code Here

                }
            }

            // This method is also called by the deploy(EjbModule) method to see if those
            // modules have any @LocalClient or @RemoteClient classes
            for (Class<?> clazz : finder.findAnnotatedClasses(LocalClient.class)) {
                clientModule.getLocalClients().add(clazz.getName());
            }

            for (Class<?> clazz : finder.findAnnotatedClasses(RemoteClient.class)) {
                clientModule.getRemoteClients().add(clazz.getName());
View Full Code Here

            // modules have any @LocalClient or @RemoteClient classes
            for (Class<?> clazz : finder.findAnnotatedClasses(LocalClient.class)) {
                clientModule.getLocalClients().add(clazz.getName());
            }

            for (Class<?> clazz : finder.findAnnotatedClasses(RemoteClient.class)) {
                clientModule.getRemoteClients().add(clazz.getName());
            }

            if (clientModule.getApplicationClient() == null){
                if (clientModule.getRemoteClients().size() > 0 || clientModule.getLocalClients().size() > 0) {
View Full Code Here

            }

            /* 19.2:  ejb-name: Default is the unqualified name of the bean class */

            EjbJar ejbJar = ejbModule.getEjbJar();
            for (Class<?> beanClass : finder.findAnnotatedClasses(Singleton.class)) {
                Singleton singleton = beanClass.getAnnotation(Singleton.class);
                String ejbName = getEjbName(singleton, beanClass);

                if (!isValidEjbAnnotationUsage(Singleton.class, beanClass, ejbName, ejbModule)) continue;

View Full Code Here

                        sessionBean.setMappedName(singleton.mappedName());
                    }
                }
            }

            for (Class<?> beanClass : finder.findAnnotatedClasses(Stateless.class)) {
                Stateless stateless = beanClass.getAnnotation(Stateless.class);
                String ejbName = getEjbName(stateless, beanClass);

                if (!isValidEjbAnnotationUsage(Stateless.class, beanClass, ejbName, ejbModule)) continue;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.