Package org.apache.xbean.finder.archive

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


                scan = read(scanXml);
            } else {
                scan = new ScanHandler();
            }

            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 (final Map.Entry<URL, List<String>> entry : index.entrySet()) {
                                    final String url = entry.getKey().toExternalForm();
View Full Code Here

                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>();
View Full Code Here

                scan = read(scanXml);
            } else {
                scan = new ScanHandler();
            }

            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

            limitedFinder = ((FinderFactory.ModuleLimitedFinder) finder).getDelegate();
        } else {
            limitedFinder = finder;
        }
        if (limitedFinder instanceof AnnotationFinder) {
            final Archive archive = ((AnnotationFinder) limitedFinder).getArchive();
            if (archive instanceof WebappAggregatedArchive) {
                final Map<URL, List<String>> index = ((WebappAggregatedArchive) archive).getClassesMap();
                final Map<String, String> 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

                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

TOP

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

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.