Examples of findMetaAnnotatedClasses()


Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

                        if (!useMeta) {
                            for (Class<?> clazz : finder.findAnnotatedClasses(annClazz)) {
                                classes.add(clazz.getName());
                            }
                        } else {
                            for (Annotated<Class<?>> clazz : finder.findMetaAnnotatedClasses(annClazz)) {
                                classes.add(clazz.get().getName());
                            }
                        }

                        if (!useMeta) {
View Full Code Here

Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

    @Test
    public void testSortClasses() throws Exception {
        AnnotationFinder finder = new AnnotationFinder(new ClassesArchive(Emerald.class)).link();

        List<Annotated<Class<?>>> classes = finder.findMetaAnnotatedClasses(Resource.class);
        assertTrue(classes.size() >= 3);

        List<Annotated<Class<?>>> sorted = AnnotationDeployer.sortClasses(classes);

        assertTrue(sorted.size() >= 3);
View Full Code Here

Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

                }

                /*
                 * @Interceptors
                 */
                final List<Annotated<Class<?>>> annotatedClasses = sortClasses(annotationFinder.findMetaAnnotatedClasses(Interceptors.class));
                for (Annotated<Class<?>> interceptorsAnnotatedClass : annotatedClasses) {
                    Interceptors interceptors = interceptorsAnnotatedClass.getAnnotation(Interceptors.class);
                    EjbJar ejbJar = ejbModule.getEjbJar();
                    for (Class interceptor : interceptors.value()) {
                        if (ejbJar.getInterceptor(interceptor.getName()) == null) {
View Full Code Here

Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

                }

                /*
                 * @Interceptors
                 */
                final List<Annotated<Class<?>>> annotatedClasses = sortClasses(annotationFinder.findMetaAnnotatedClasses(Interceptors.class));
                for (Annotated<Class<?>> interceptorsAnnotatedClass : annotatedClasses) {
                    Interceptors interceptors = interceptorsAnnotatedClass.getAnnotation(Interceptors.class);
                    EjbJar ejbJar = ejbModule.getEjbJar();
                    for (Class interceptor : interceptors.value()) {
                        if (ejbJar.getInterceptor(interceptor.getName()) == null) {
View Full Code Here

Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

    @Test
    public void testSortClasses() throws Exception {
        AnnotationFinder finder = new AnnotationFinder(new ClassesArchive(Emerald.class)).link();

        List<Annotated<Class<?>>> classes = finder.findMetaAnnotatedClasses(Resource.class);
        assertTrue(classes.size() >= 3);

        List<Annotated<Class<?>>> sorted = AnnotationDeployer.sortClasses(classes);

        assertTrue(sorted.size() >= 3);
View Full Code Here

Examples of org.apache.xbean.finder.AnnotationFinder.findMetaAnnotatedClasses()

        }
        if (libs.size() > 0) {
            // force descriptor for additinal libs since it shouldn't occur often and can save some time
            final IAnnotationFinder finder = new AnnotationFinder(new ConfigurableClasspathArchive(appModule.getClassLoader(), true, libs));
            for (final Class<? extends Annotation> mclazz : mbeanClasses) {
                for (final Annotated<Class<?>> clazz : finder.findMetaAnnotatedClasses(mclazz)) {
                    final String name = clazz.get().getName();
                    if (done.contains(name)) {
                        continue;
                    }
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findMetaAnnotatedClasses()

                }
            }

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

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

Examples of org.apache.xbean.finder.IAnnotationFinder.findMetaAnnotatedClasses()

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

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

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

Examples of org.apache.xbean.finder.IAnnotationFinder.findMetaAnnotatedClasses()

            }

            // look for ApplicationPath, it will often return the same than the previous one
            // but without finder.link() invocation it still works
            // so it can save a lot of startup time
            List<Annotated<Class<?>>> applicationsByAnnotation = finder.findMetaAnnotatedClasses(ApplicationPath.class);
            for (Annotated<Class<?>> annotatedApp : applicationsByAnnotation) {
                final Class<?> app = annotatedApp.get();
                if (!Application.class.isAssignableFrom(app)) {
                    logger.error("class '" + app.getName() + "' is annotated with @ApplicationPath but doesn't implement " + Application.class.getName());
                    continue;
View Full Code Here

Examples of org.apache.xbean.finder.IAnnotationFinder.findMetaAnnotatedClasses()

                    clazz = (Class<? extends Annotation>) classLoader.loadClass(jsfClass);
                } catch (ClassNotFoundException e) {
                    continue;
                }

                final List<Annotated<Class<?>>> found = finder.findMetaAnnotatedClasses(clazz);
                final Set<String> convertedClasses = new HashSet<String>(found.size());
                for (Annotated<Class<?>> annotated : found) {
                    convertedClasses.add(annotated.get().getName());
                }
                webModule.getJsfAnnotatedClasses().put(jsfClass, convertedClasses);
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.