Package org.jboss.jandex

Examples of org.jboss.jandex.IndexReader


            final Set<Index> indexes = new HashSet<Index>();
            while (resources.hasMoreElements()) {
                final URL url = resources.nextElement();
                InputStream stream = url.openStream();
                try {
                    IndexReader reader = new IndexReader(stream);
                    indexes.add(reader.read());
                } finally {
                    stream.close();
                }
            }
            return new CompositeIndex(indexes);
View Full Code Here


            }

            VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATION);
            if (indexFile.exists()) {
                try {
                    IndexReader reader = new IndexReader(indexFile.openStream());
                    resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, reader.read());
                    logger.tracef("Found and read index at: %s", indexFile);
                    continue;
                } catch (Exception e) {
                    logger.debugf("Could not read provided index: %s", indexFile, e);
                }
View Full Code Here

        InputStream indexFileStream = null;
        try {
            indexFileStream = indexURL.openStream();
            CommonLogger.LOG.foundJandexIndex(indexURL);
            final IndexReader indexFileReader = new IndexReader(indexFileStream);
            index = indexFileReader.read();
        } catch (IllegalArgumentException e) {
            CommonLogger.LOG.warnv("Jandex index at {} is not valid", indexUrlString);
        } catch (UnsupportedVersion e) {
            CommonLogger.LOG.warnv("Version of Jandex index at {} is not supported", indexUrlString);
        } catch (FileNotFoundException ignore) {
View Full Code Here

            final Set<Index> indexes = new HashSet<Index>();
            while (resources.hasMoreElements()) {
                final URL url = resources.nextElement();
                InputStream stream = url.openStream();
                try {
                    IndexReader reader = new IndexReader(stream);
                    indexes.add(reader.read());
                } finally {
                    stream.close();
                }
            }
            return new CompositeIndex(indexes);
View Full Code Here

        }

        VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATION);
        if (indexFile.exists()) {
            try {
                IndexReader reader = new IndexReader(indexFile.openStream());
                resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, reader.read());
                ServerLogger.DEPLOYMENT_LOGGER.tracef("Found and read index at: %s", indexFile);
                return;
            } catch (Exception e) {
                ServerLogger.DEPLOYMENT_LOGGER.cannotLoadAnnotationIndex(indexFile.getPathName());
            }
View Full Code Here

        }

        VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATION);
        if (indexFile.exists()) {
            try {
                IndexReader reader = new IndexReader(indexFile.openStream());
                resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, reader.read());
                ServerLogger.DEPLOYMENT_LOGGER.tracef("Found and read index at: %s", indexFile);
                return;
            } catch (Exception e) {
                ServerLogger.DEPLOYMENT_LOGGER.cannotLoadAnnotationIndex(indexFile.getPathName());
            }
View Full Code Here

           final Set<Index> indexes = new HashSet<Index>();
           while(resources.hasMoreElements()) {
               final URL url = resources.nextElement();
               InputStream stream = url.openStream();
               try {
                   IndexReader reader = new IndexReader(stream);
                   indexes.add(reader.read());
               }finally {
                   stream.close();
               }
           }
           return new CompositeIndex(indexes);
View Full Code Here

        }

        VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATION);
        if (indexFile.exists()) {
            try {
                IndexReader reader = new IndexReader(indexFile.openStream());
                resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, reader.read());
                ServerLogger.DEPLOYMENT_LOGGER.tracef("Found and read index at: %s", indexFile);
                return;
            } catch (Exception e) {
                ServerLogger.DEPLOYMENT_LOGGER.cannotLoadAnnotationIndex(indexFile.getPathName());
            }
View Full Code Here

TOP

Related Classes of org.jboss.jandex.IndexReader

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.