Package org.jboss.jandex

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


                        throw new IOException("Could not index class "+classFile.getPathNameRelativeTo(virtualFile)+" in archive '"+virtualFile+"'",e);
                    } finally {
                        VFSUtils.safeClose(inputStream);
                    }
                }
                final Index index = indexer.complete();
                resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, index);
            } catch (Throwable t) {
                throw new DeploymentUnitProcessingException("Failed to index deployment root for annotations", t);
            }
        }
View Full Code Here


    // for now we just skip entities defined in (1) orm.xml files and (2) hbm.xml files.  this part really needs
    // metamodel branch...

    // for now, we also need to wrap this in a CompositeIndex until Jandex is updated to use a common interface
    // between the 2...
    return indexer.complete();
  }

  private void indexStream(Indexer indexer, InputStreamAccess streamAccess) {
    try {
      InputStream stream = streamAccess.accessInputStream();
View Full Code Here

    // add package-info from the configured packages
    for ( String packageName : metadataSources.getAnnotatedPackages() ) {
      indexClass( indexer, packageName.replace( '.', '/' ) + "/package-info.class" );
    }
    Index index = indexer.complete();

    // process the xml configuration
    final OrmXmlParser ormParser = new OrmXmlParser( this );
    List<JaxbRoot<XMLEntityMappings>> mappings = new ArrayList<JaxbRoot<XMLEntityMappings>>();
    for ( JaxbRoot<?> root : metadataSources.getJaxbRootList() ) {
View Full Code Here

        }
        builder.append( "]" );
        throw new HibernateException( "Unable to create annotation index for " + builder.toString() );
      }
    }
    return indexer.complete();
  }

  public static Map<DotName, List<AnnotationInstance>> getMemberAnnotations(ClassInfo classInfo, String name) {
    if ( classInfo == null ) {
      throw new IllegalArgumentException( "classInfo cannot be null" );
View Full Code Here

    // add package-info from the configured packages
    for ( String packageName : sources.getAnnotatedPackages() ) {
      indexClass( indexer, packageName.replace( '.', '/' ) + "/package-info.class" );
    }

    index = indexer.complete();

    List<JaxbRoot<XMLEntityMappings>> mappings = new ArrayList<JaxbRoot<XMLEntityMappings>>();
    for ( JaxbRoot<?> root : sources.getJaxbRootList() ) {
      if ( root.getRoot() instanceof XMLEntityMappings ) {
        mappings.add( (JaxbRoot<XMLEntityMappings>) root );
View Full Code Here

        }
        builder.append( "]" );
        throw new HibernateException( "Unable to create annotation index for " + builder.toString() );
      }
    }
    return indexer.complete();
  }

  public static Map<DotName, List<AnnotationInstance>> getMemberAnnotations(ClassInfo classInfo, String name) {
    if ( classInfo == null ) {
      throw new IllegalArgumentException( "classInfo cannot be null" );
View Full Code Here

        }
        builder.append( "]" );
        throw new HibernateException( "Unable to create annotation index for " + builder.toString() );
      }
    }
    return indexer.complete();
  }

  public static Map<DotName, List<AnnotationInstance>> getMemberAnnotations(ClassInfo classInfo, String name) {
    if ( classInfo == null ) {
      throw new IllegalArgumentException( "classInfo cannot be null" );
View Full Code Here

                        logger.warn("Could not index class " + classFile.getPathNameRelativeTo(virtualFile) + " in archive '" + virtualFile + "'", e);
                    } finally {
                        VFSUtils.safeClose(inputStream);
                    }
                }
                final Index index = indexer.complete();
                resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, index);
                logger.tracef("Generated index for archive %s", virtualFile);
            } catch (Throwable t) {
                throw new DeploymentUnitProcessingException("Failed to index deployment root for annotations", t);
            }
View Full Code Here

                    indexer.index(inputStream);
                } finally {
                    VFSUtils.safeClose(inputStream);
                }
            }
            final Index index = indexer.complete();
            context.putAttachment(ATTACHMENT_KEY, index);
        } catch(Throwable t) {
            throw new DeploymentUnitProcessingException("Failed to index deployment root for annotations", t);
        }
    }
View Full Code Here

    // add package-info from the configured packages
    for ( String packageName : sources.getAnnotatedPackages() ) {
      indexClass( indexer, packageName.replace( '.', '/' ) + "/package-info.class" );
    }

    index = indexer.complete();

    List<JaxbRoot<XMLEntityMappings>> mappings = new ArrayList<JaxbRoot<XMLEntityMappings>>();
    for ( JaxbRoot<?> root : sources.getJaxbRootList() ) {
      if ( root.getRoot() instanceof XMLEntityMappings ) {
        mappings.add( (JaxbRoot<XMLEntityMappings>) root );
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.