Package org.jboss.jandex

Examples of org.jboss.jandex.Indexer.index()


                    VisitorAttributes.RECURSE_LEAVES_ONLY));
            for (VirtualFile classFile : classChildren) {
                InputStream inputStream = null;
                try {
                    inputStream = classFile.openStream();
                    indexer.index(inputStream);
                } finally {
                    VFSUtils.safeClose(inputStream);
                }
            }
            final Index index = indexer.complete();
View Full Code Here


                    VisitorAttributes.RECURSE_LEAVES_ONLY));
            for (VirtualFile classFile : classChildren) {
                InputStream inputStream = null;
                try {
                    inputStream = classFile.openStream();
                    indexer.index(inputStream);
                } finally {
                    VFSUtils.safeClose(inputStream);
                }
            }
            final Index index = indexer.complete();
View Full Code Here

                    VisitorAttributes.RECURSE_LEAVES_ONLY));
            for (VirtualFile classFile : classChildren) {
                InputStream inputStream = null;
                try {
                    inputStream = classFile.openStream();
                    indexer.index(inputStream);
                } finally {
                    VFSUtils.safeClose(inputStream);
                }
            }
            final Index index = indexer.complete();
View Full Code Here

        jar.addClasses(ModuleServlet.class);


        Indexer indexer = new Indexer();
        try (final InputStream resource = ModuleServlet.class.getResourceAsStream(ModuleServlet.class.getSimpleName() + ".class")) {
            indexer.index(resource);
        }
        Index index = indexer.complete();
        ByteArrayOutputStream data = new ByteArrayOutputStream();
        IndexWriter writer = new IndexWriter(data);
        writer.write(index);
View Full Code Here

        jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");


        Indexer indexer = new Indexer();
        try (final InputStream resource = ModuleEjb.class.getResourceAsStream(ModuleEjb.class.getSimpleName() + ".class")) {
            indexer.index(resource);
        }
        Index index = indexer.complete();
        ByteArrayOutputStream data = new ByteArrayOutputStream();
        IndexWriter writer = new IndexWriter(data);
        writer.write(index);
View Full Code Here

            final ClassLoader cl = GlobalModulesTestCase.class.getClassLoader();

            //create annotation index
            Indexer indexer = new Indexer();
            indexer.index(cl.getResourceAsStream(GlobalModuleEjb.class.getName().replace(".","/") + ".class"));
            indexer.index(cl.getResourceAsStream(GlobalModuleInterceptor.class.getName().replace(".", "/") + ".class"));
            final Index index = indexer.complete();
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
            IndexWriter writer = new IndexWriter(out);
            writer.write(index);
View Full Code Here

            final ClassLoader cl = GlobalModulesTestCase.class.getClassLoader();

            //create annotation index
            Indexer indexer = new Indexer();
            indexer.index(cl.getResourceAsStream(GlobalModuleEjb.class.getName().replace(".","/") + ".class"));
            indexer.index(cl.getResourceAsStream(GlobalModuleInterceptor.class.getName().replace(".", "/") + ".class"));
            final Index index = indexer.complete();
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
            IndexWriter writer = new IndexWriter(out);
            writer.write(index);
            jar.addAsManifestResource(new ByteArrayAsset(out.toByteArray()), "jandex.idx");
View Full Code Here

                final List<VirtualFile> classChildren = virtualFile.getChildren(new SuffixMatchFilter(".class", visitorAttributes));
                for (VirtualFile classFile : classChildren) {
                    InputStream inputStream = null;
                    try {
                        inputStream = classFile.openStream();
                        indexer.index(inputStream);
                    }catch (Exception e){
                        throw new IOException("Could not index class "+classFile.getPathNameRelativeTo(virtualFile)+" in archive '"+virtualFile+"'",e);
                    } finally {
                        VFSUtils.safeClose(inputStream);
                    }
View Full Code Here

    for ( Class<?> clazz : classes ) {
      InputStream stream = classLoaderService.locateResourceStream(
          clazz.getName().replace( '.', '/' ) + ".class"
      );
      try {
        indexer.index( stream );
      }
      catch ( IOException e ) {
        StringBuilder builder = new StringBuilder();
        builder.append( "[" );
        int count = 0;
View Full Code Here

    for ( Class<?> clazz : classes ) {
      InputStream stream = classLoaderService.locateResourceStream(
          clazz.getName().replace( '.', '/' ) + ".class"
      );
      try {
        indexer.index( stream );
      }
      catch ( IOException e ) {
        StringBuilder builder = new StringBuilder();
        builder.append( "[" );
        int count = 0;
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.