Package org.apache.xbean.finder

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


            annotationClassSetMap.put(FacesConverter.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesConverter.class)));
            annotationClassSetMap.put(FacesValidator.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesValidator.class)));
            annotationClassSetMap.put(FacesRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesRenderer.class)));
            annotationClassSetMap.put(javax.faces.bean.ManagedBean.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(javax.faces.bean.ManagedBean.class)));
            annotationClassSetMap.put(NamedEvent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(NamedEvent.class)));
            annotationClassSetMap.put(FacesBehavior.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehavior.class)));
            annotationClassSetMap.put(FacesBehaviorRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehaviorRenderer.class)));
            return new AnnotationConfigurator() {

                @Override
                public org.apache.myfaces.config.impl.digester.elements.FacesConfig createFacesConfig(ExternalContext externalContext, boolean metaComplete) {
View Full Code Here


            annotationClassSetMap.put(FacesValidator.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesValidator.class)));
            annotationClassSetMap.put(FacesRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesRenderer.class)));
            annotationClassSetMap.put(javax.faces.bean.ManagedBean.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(javax.faces.bean.ManagedBean.class)));
            annotationClassSetMap.put(NamedEvent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(NamedEvent.class)));
            annotationClassSetMap.put(FacesBehavior.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehavior.class)));
            annotationClassSetMap.put(FacesBehaviorRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehaviorRenderer.class)));
            return new AnnotationConfigurator() {

                @Override
                public org.apache.myfaces.config.impl.digester.elements.FacesConfig createFacesConfig(ExternalContext externalContext, boolean metaComplete) {
                    return createFacesConfig(annotationClassSetMap);
View Full Code Here

        ServiceReference sr = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());
        PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(sr);
        try {
            BundleAnnotationFinder classFinder = new BundleAnnotationFinder(packageAdmin, bundle);
            List<Class<?>> classes = new ArrayList<Class<?>>();
            classes.addAll(classFinder.findAnnotatedClasses(WebService.class));
            classes.addAll(classFinder.findAnnotatedClasses(WebServiceProvider.class));
            return classes;
        } catch (Exception e) {
            throw new DeploymentException("Error scanning for web service annotations in bundle", e);
        } finally {
View Full Code Here

        PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(sr);
        try {
            BundleAnnotationFinder classFinder = new BundleAnnotationFinder(packageAdmin, bundle);
            List<Class<?>> classes = new ArrayList<Class<?>>();
            classes.addAll(classFinder.findAnnotatedClasses(WebService.class));
            classes.addAll(classFinder.findAnnotatedClasses(WebServiceProvider.class));
            return classes;
        } catch (Exception e) {
            throw new DeploymentException("Error scanning for web service annotations in bundle", e);
        } finally {
            bundle.getBundleContext().ungetService(sr);
View Full Code Here

                @Override
                public boolean zipFileDiscoveryRequired(String url) {
                    return isJarFile ? url.equals(prefix) : false;
                }
            });
            List<Class<?>> webServlets = bundleAnnotationFinder.findAnnotatedClasses(WebServlet.class);
            WEB_SERVLET_ANNOTATION_MERGE_HANDLER.merge(webServlets.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webFilters = bundleAnnotationFinder.findAnnotatedClasses(WebFilter.class);
            WEB_FILTER_ANNOTATION_MERGE_HANDLER.merge(webFilters.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webListeners = bundleAnnotationFinder.findAnnotatedClasses(WebListener.class);
            WEB_LISTENER_ANNOTATION_MERGE_HANDLER.merge(webListeners.toArray(new Class<?>[0]), webApp, mergeContext);
View Full Code Here

                    return isJarFile ? url.equals(prefix) : false;
                }
            });
            List<Class<?>> webServlets = bundleAnnotationFinder.findAnnotatedClasses(WebServlet.class);
            WEB_SERVLET_ANNOTATION_MERGE_HANDLER.merge(webServlets.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webFilters = bundleAnnotationFinder.findAnnotatedClasses(WebFilter.class);
            WEB_FILTER_ANNOTATION_MERGE_HANDLER.merge(webFilters.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webListeners = bundleAnnotationFinder.findAnnotatedClasses(WebListener.class);
            WEB_LISTENER_ANNOTATION_MERGE_HANDLER.merge(webListeners.toArray(new Class<?>[0]), webApp, mergeContext);
        } catch (Exception e) {
            throw new DeploymentException("Fail to merge annotations in " + prefix, e);
View Full Code Here

            });
            List<Class<?>> webServlets = bundleAnnotationFinder.findAnnotatedClasses(WebServlet.class);
            WEB_SERVLET_ANNOTATION_MERGE_HANDLER.merge(webServlets.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webFilters = bundleAnnotationFinder.findAnnotatedClasses(WebFilter.class);
            WEB_FILTER_ANNOTATION_MERGE_HANDLER.merge(webFilters.toArray(new Class<?>[0]), webApp, mergeContext);
            List<Class<?>> webListeners = bundleAnnotationFinder.findAnnotatedClasses(WebListener.class);
            WEB_LISTENER_ANNOTATION_MERGE_HANDLER.merge(webListeners.toArray(new Class<?>[0]), webApp, mergeContext);
        } catch (Exception e) {
            throw new DeploymentException("Fail to merge annotations in " + prefix, e);
        }
    }
View Full Code Here

                public boolean zipFileDiscoveryRequired(String jarFile) {
                    return requiredJarFiles.contains(jarFile);
                }

            });
            annotationClassSetMap.put(FacesComponent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesComponent.class)));
            annotationClassSetMap.put(FacesConverter.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesConverter.class)));
            annotationClassSetMap.put(FacesValidator.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesValidator.class)));
            annotationClassSetMap.put(FacesRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesRenderer.class)));
            annotationClassSetMap.put(javax.faces.bean.ManagedBean.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(javax.faces.bean.ManagedBean.class)));
            annotationClassSetMap.put(NamedEvent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(NamedEvent.class)));
View Full Code Here

                    return requiredJarFiles.contains(jarFile);
                }

            });
            annotationClassSetMap.put(FacesComponent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesComponent.class)));
            annotationClassSetMap.put(FacesConverter.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesConverter.class)));
            annotationClassSetMap.put(FacesValidator.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesValidator.class)));
            annotationClassSetMap.put(FacesRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesRenderer.class)));
            annotationClassSetMap.put(javax.faces.bean.ManagedBean.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(javax.faces.bean.ManagedBean.class)));
            annotationClassSetMap.put(NamedEvent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(NamedEvent.class)));
            annotationClassSetMap.put(FacesBehavior.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehavior.class)));
View Full Code Here

                }

            });
            annotationClassSetMap.put(FacesComponent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesComponent.class)));
            annotationClassSetMap.put(FacesConverter.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesConverter.class)));
            annotationClassSetMap.put(FacesValidator.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesValidator.class)));
            annotationClassSetMap.put(FacesRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesRenderer.class)));
            annotationClassSetMap.put(javax.faces.bean.ManagedBean.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(javax.faces.bean.ManagedBean.class)));
            annotationClassSetMap.put(NamedEvent.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(NamedEvent.class)));
            annotationClassSetMap.put(FacesBehavior.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehavior.class)));
            annotationClassSetMap.put(FacesBehaviorRenderer.class, new HashSet<Class<?>>(bundleAnnotationFinder.findAnnotatedClasses(FacesBehaviorRenderer.class)));
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.