Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


            }

            Set<Class<?>> result = new HashSet<Class<?>>();

            for (Class<? extends Annotation> annClass : annotationsToLookFor) {
                DotName annotation = DotName.createSimple(annClass.getName());
                List<AnnotationInstance> classesWithAnnotation = index.getAnnotations(annotation);
                Set<Class<?>> classesForAnnotation = new HashSet<Class<?>>();
                for (AnnotationInstance annotationInstance : classesWithAnnotation) {
                    // verify that the annotation target is actually a class, since some frameworks
                    // may generate bytecode with annotations placed on methods (see AS7-2559)
View Full Code Here


    return index;
  }

  @Override
  public ClassInfo getClassInfo(String name) {
    DotName dotName = DotName.createSimple( name );
    return index.getClassByName( dotName );
  }
View Full Code Here

   * @return Finds the root entity starting at the entity given by {@code info}
   */
  private static ClassInfo findRootEntityClassInfo(Index index, ClassInfo info) {
    ClassInfo rootEntity = info;

    DotName superName = info.superName();
    ClassInfo tmpInfo;
    // walk up the hierarchy until java.lang.Object
    while ( !OBJECT.equals( superName ) ) {
      tmpInfo = index.getClassByName( superName );
      if ( isEntityClass( tmpInfo ) ) {
View Full Code Here

    }
    return rootEntity;
  }

  private static void addMappedSuperclasses(Index index, ClassInfo info, List<ClassInfo> classInfoList) {
    DotName superName = info.superName();
    ClassInfo tmpInfo;
    // walk up the hierarchy until java.lang.Object
    while ( !OBJECT.equals( superName ) ) {
      tmpInfo = index.getClassByName( superName );
      if ( isMappedSuperclass( tmpInfo ) ) {
View Full Code Here

    }
    return annotations;
  }

  private static void addAnnotationToMap(AnnotationInstance instance, Map<DotName, List<AnnotationInstance>> annotations) {
    DotName dotName = instance.name();
    List<AnnotationInstance> list;
    if ( annotations.containsKey( dotName ) ) {
      list = annotations.get( dotName );
    }
    else {
View Full Code Here

      ClassInfo parent = indexBuilder.getClassInfo( className );
      if ( parent == null ) {
        parent = indexBuilder.getIndexedClassInfo( className );
      }
      if ( parent != null ) {
        DotName parentClassName = parent.superName();
        accessType = getAccessFromIdPosition( parentClassName, indexBuilder );
      }

    }
View Full Code Here

      ClassInfo parent = indexBuilder.getClassInfo( className );
      if ( parent == null ) {
        parent = indexBuilder.getIndexedClassInfo( className );
      }
      if ( parent != null ) {
        DotName parentClassName = parent.superName();
        accessType = getEntityAccess( parentClassName, indexBuilder );
      }
    }
    return accessType;
View Full Code Here

    return null;
  }

  @Override
  protected AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] annotationValues) {
    DotName defaultName = nameMapper.get( name );
    if ( defaultName == null ) {
      return null;
    }
    return super.create( defaultName, target, annotationValues );
View Full Code Here

   * Pre-process Entity Objects to find the default {@link javax.persistence.Access} for later attributes processing.
   */
  final void preProcess() {
    applyDefaults();
    classInfo = indexBuilder.createClassInfo( getClassName() );
    DotName classDotName = classInfo.name();
    if ( isMetadataComplete() ) {
      indexBuilder.metadataComplete( classDotName );
    }
    parserAccessType( getAccessType(), getTarget() );
    isPreProcessCalled = true;
View Full Code Here

   * @return Index.
   */
  Index build(EntityMappingsMocker.Default globalDefaults) {
    //merge annotations that not overrided by xml into the new Index
    for ( ClassInfo ci : index.getKnownClasses() ) {
      DotName name = ci.name();
      if ( indexedClassInfoAnnotationsMap.containsKey( name ) ) {
        //this class has been overrided by orm.xml
        continue;
      }
      if ( ci.annotations() != null && !ci.annotations().isEmpty() ) {
View Full Code Here

TOP

Related Classes of org.jboss.jandex.DotName

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.