Package org.apache.xbean.finder.archive

Examples of org.apache.xbean.finder.archive.Archive


            // force cast otherwise we would be broken
            final IAnnotationFinder delegate = FinderFactory.ModuleLimitedFinder.class.isInstance(finder) ?
                    FinderFactory.ModuleLimitedFinder.class.cast(finder).getDelegate() : finder;
            final AnnotationFinder annotationFinder = AnnotationFinder.class.cast(delegate);

            final Archive archive = annotationFinder.getArchive();
            final Map<URL, List<String>> classes = new HashMap<>();

            if (!WebappAggregatedArchive.class.isInstance(archive)) {
                classes.put(null, annotationFinder.getAnnotatedClassNames());
                return classes;
View Full Code Here


                if (urlByClasses == null) { // try to reuse scanning info, maybe some better indexing can be a nice idea
                    if (finder instanceof FinderFactory.ModuleLimitedFinder) {
                        final IAnnotationFinder limitedFinder = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
                        if (limitedFinder instanceof AnnotationFinder) {
                            final Archive archive = ((AnnotationFinder) limitedFinder).getArchive();
                            if (archive instanceof WebappAggregatedArchive) {
                                final Map<URL, List<String>> index = ((WebappAggregatedArchive) archive).getClassesMap();
                                urlByClasses = new HashMap<String, String>();
                                for (Map.Entry<URL, List<String>> entry : index.entrySet()) {
                                    final String url = entry.getKey().toExternalForm();
View Full Code Here

            final IAnnotationFinder delegate = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
            if (!(delegate instanceof AnnotationFinder)) return finder.getAnnotatedClassNames();

            final AnnotationFinder annotationFinder = (AnnotationFinder) delegate;

            final Archive archive = annotationFinder.getArchive();
            if (!(archive instanceof WebappAggregatedArchive)) return finder.getAnnotatedClassNames();

            final List<String> classes = new ArrayList<String>();

            final WebappAggregatedArchive aggregatedArchive = (WebappAggregatedArchive) archive;
View Full Code Here

                return new ClassesArchive();
            }

            // read descriptors
            final ScanUtil.ScanHandler scan = ScanUtil.read(scanXml);
            final Archive packageArchive = packageArchive(scan.getPackages(), loader, location);
            final Archive classesArchive = classesArchive(scan.getPackages(), scan.getClasses(), loader);

            if (packageArchive != null && classesArchive != null) {
                return new CompositeArchive(classesArchive, packageArchive);
            } else if (packageArchive != null) {
                return  packageArchive;
View Full Code Here

                if (urlByClasses == null) { // try to reuse scanning info, maybe some better indexing can be a nice idea
                    if (finder instanceof FinderFactory.ModuleLimitedFinder) {
                        final IAnnotationFinder limitedFinder = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
                        if (limitedFinder instanceof AnnotationFinder) {
                            final Archive archive = ((AnnotationFinder) limitedFinder).getArchive();
                            if (archive instanceof WebappAggregatedArchive) {
                                final Map<URL, List<String>> index = ((WebappAggregatedArchive) archive).getClassesMap();
                                urlByClasses = new HashMap<String, String>();
                                for (Map.Entry<URL, List<String>> entry : index.entrySet()) {
                                    final String url = entry.getKey().toExternalForm();
View Full Code Here

            final IAnnotationFinder delegate = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
            if (!(delegate instanceof AnnotationFinder)) return finder.getAnnotatedClassNames();

            final AnnotationFinder annotationFinder = (AnnotationFinder) delegate;

            final Archive archive = annotationFinder.getArchive();
            if (!(archive instanceof WebappAggregatedArchive)) return finder.getAnnotatedClassNames();

            final List<String> classes = new ArrayList<String>();

            final WebappAggregatedArchive aggregatedArchive = (WebappAggregatedArchive) archive;
View Full Code Here

            }
        }

        for (URL url : urls) {
            final List<String> classes = new ArrayList<String>();
            final Archive archive = new FilteredArchive(new ConfigurableClasspathArchive(module.getClassLoader(), Arrays.asList(url)), new ScanXmlSaverFilter(scanXmlExists, handler, classes));
            map.put(url, classes);
            archives.add(archive);
        }

        archive = new CompositeArchive(archives);
View Full Code Here

                if (urlByClasses == null) { // try to reuse scanning info, maybe some better indexing can be a nice idea
                    if (finder instanceof FinderFactory.ModuleLimitedFinder) {
                        final IAnnotationFinder limitedFinder = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
                        if (limitedFinder instanceof AnnotationFinder) {
                            final Archive archive = ((AnnotationFinder) limitedFinder).getArchive();
                            if (archive instanceof WebappAggregatedArchive) {
                                final Map<URL, List<String>> index = ((WebappAggregatedArchive) archive).getClassesMap();
                                urlByClasses = new HashMap<String, String>();
                                for (final Map.Entry<URL, List<String>> entry : index.entrySet()) {
                                    final String url = entry.getKey().toExternalForm();
View Full Code Here

            // force cast otherwise we would be broken
            final IAnnotationFinder delegate = FinderFactory.ModuleLimitedFinder.class.isInstance(finder) ?
                    FinderFactory.ModuleLimitedFinder.class.cast(finder).getDelegate() : finder;
            final AnnotationFinder annotationFinder = AnnotationFinder.class.cast(delegate);

            final Archive archive = annotationFinder.getArchive();
            final Map<URL, List<String>> classes = new HashMap<>();

            if (!WebappAggregatedArchive.class.isInstance(archive)) {
                classes.put(null, annotationFinder.getAnnotatedClassNames());
                return classes;
View Full Code Here

        for (final URL url : urls.values())
        {
            final List<String> urlClasses = new ArrayList<String>();

            BeanArchiveInformation beanArchiveInfo = beanArchiveService.getBeanArchiveInformation(url);
            final Archive archive = new FilteredArchive(ClasspathArchive.archive(loader, url),
                    new BeanArchiveFilter(beanArchiveInfo, urlClasses));

            classesByUrl.put(url.toExternalForm(), new FoundClasses(url, urlClasses, beanArchiveInfo));
            archives.add(archive);
        }
View Full Code Here

TOP

Related Classes of org.apache.xbean.finder.archive.Archive

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.