Package org.apache.xbean.finder

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


            });
            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


        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

       
        AnnotatedApp app = module.getAnnotatedApp();
       
        // step 1: process annotations and update deployment descriptor
        List<Class> classes;       
        classes = classFinder.findAnnotatedClasses(DataSourceDefinitions.class);
        if (classes != null) {
            for (Class clazz : classes) {
                DataSourceDefinitions dsDefinitions = (DataSourceDefinitions) clazz.getAnnotation(DataSourceDefinitions.class);
                for (DataSourceDefinition dsDefinition : dsDefinitions.value()) {
                    processDefinition(dsDefinition, app);
View Full Code Here

                    processDefinition(dsDefinition, app);
                }
               
            }
        }
        classes = classFinder.findAnnotatedClasses(DataSourceDefinition.class);
        if (classes != null) {
            for (Class clazz : classes) {
                DataSourceDefinition dsDefinition = (DataSourceDefinition) clazz.getAnnotation(DataSourceDefinition.class);
                processDefinition(dsDefinition, app);
            }
View Full Code Here

    private Tblueprint generateBlueprintModel(Bundle bundle) {
        BundleAnnotationFinder baf = createBundleAnnotationFinder(bundle);

        // we don't trust baf when it comes to returning classes just once (ARIES-654)
        Set<Class> blueprintClasses = new LinkedHashSet<Class>(baf.findAnnotatedClasses(Blueprint.class));
        Set<Class> beanClasses = new HashSet<Class>(baf.findAnnotatedClasses(Bean.class));
        Set<Class> refListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(ReferenceListener.class));
        Set<Class> regListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(RegistrationListener.class));
        Map<String, TreferenceListener> reflMap = new HashMap<String, TreferenceListener>();
        Map<String, TregistrationListener> reglMap = new HashMap<String, TregistrationListener>();
View Full Code Here

    private Tblueprint generateBlueprintModel(Bundle bundle) {
        BundleAnnotationFinder baf = createBundleAnnotationFinder(bundle);

        // we don't trust baf when it comes to returning classes just once (ARIES-654)
        Set<Class> blueprintClasses = new LinkedHashSet<Class>(baf.findAnnotatedClasses(Blueprint.class));
        Set<Class> beanClasses = new HashSet<Class>(baf.findAnnotatedClasses(Bean.class));
        Set<Class> refListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(ReferenceListener.class));
        Set<Class> regListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(RegistrationListener.class));
        Map<String, TreferenceListener> reflMap = new HashMap<String, TreferenceListener>();
        Map<String, TregistrationListener> reglMap = new HashMap<String, TregistrationListener>();
       
View Full Code Here

        BundleAnnotationFinder baf = createBundleAnnotationFinder(bundle);

        // we don't trust baf when it comes to returning classes just once (ARIES-654)
        Set<Class> blueprintClasses = new LinkedHashSet<Class>(baf.findAnnotatedClasses(Blueprint.class));
        Set<Class> beanClasses = new HashSet<Class>(baf.findAnnotatedClasses(Bean.class));
        Set<Class> refListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(ReferenceListener.class));
        Set<Class> regListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(RegistrationListener.class));
        Map<String, TreferenceListener> reflMap = new HashMap<String, TreferenceListener>();
        Map<String, TregistrationListener> reglMap = new HashMap<String, TregistrationListener>();
       
        Tblueprint tblueprint = new Tblueprint();
View Full Code Here

        // we don't trust baf when it comes to returning classes just once (ARIES-654)
        Set<Class> blueprintClasses = new LinkedHashSet<Class>(baf.findAnnotatedClasses(Blueprint.class));
        Set<Class> beanClasses = new HashSet<Class>(baf.findAnnotatedClasses(Bean.class));
        Set<Class> refListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(ReferenceListener.class));
        Set<Class> regListenerClasses = new HashSet<Class>(baf.findAnnotatedClasses(RegistrationListener.class));
        Map<String, TreferenceListener> reflMap = new HashMap<String, TreferenceListener>();
        Map<String, TregistrationListener> reglMap = new HashMap<String, TregistrationListener>();
       
        Tblueprint tblueprint = new Tblueprint();
       
View Full Code Here

    }

    private Tblueprint generateBlueprintModel(Bundle bundle) {
        BundleAnnotationFinder baf = createBundleAnnotationFinder(bundle);

        List<Class> blueprintClasses = baf.findAnnotatedClasses(Blueprint.class);
        List<Class> beanClasses = baf.findAnnotatedClasses(Bean.class);
        List<Class> refListenerClasses = baf.findAnnotatedClasses(ReferenceListener.class);
        List<Class> regListenerClasses = baf.findAnnotatedClasses(RegistrationListener.class);
        Map<String, TreferenceListener> reflMap = new HashMap<String, TreferenceListener>();
        Map<String, TregistrationListener> reglMap = new HashMap<String, TregistrationListener>();
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.