Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


            return;
        }

        // Check if we have a BundleContext injection point
        boolean hasBundleContextResource = false;
        final DotName resourceDotName = DotName.createSimple(Resource.class.getName());
        final DotName targetDotName = DotName.createSimple(BundleContext.class.getName());
        final List<AnnotationInstance> anList = compositeIndex.getAnnotations(resourceDotName);
        for (AnnotationInstance an : anList) {
            AnnotationTarget anTarget = an.target();
            if (anTarget instanceof FieldInfo) {
                FieldInfo fieldInfo = (FieldInfo) anTarget;
View Full Code Here


        }

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

        for (Class<? extends Annotation> annClass : annotationsToLookFor) {
            DotName annotation = DotName.createSimple(annClass.getName());
            List<AnnotationInstance> classesWithAnnotation = index.getAnnotations(annotation);
            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)
                if (annotationInstance.target() instanceof ClassInfo) {
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

      pushIfNotExist( annotationInstance );
    }
  }

  private void pushIfNotExist(AnnotationInstance annotationInstance) {
    DotName annName = annotationInstance.name();
    boolean isNotExist = false;
    if ( annName.equals( SQL_RESULT_SET_MAPPINGS ) ) {
      AnnotationInstance[] annotationInstances = annotationInstance.value().asNestedArray();
      for ( AnnotationInstance ai : annotationInstances ) {
        pushIfNotExist( ai );
      }
    }
    else {
      AnnotationValue value = annotationInstance.value( "name" );
      String name = value.asString();
      isNotExist = ( annName.equals( TABLE_GENERATOR ) && !tableGeneratorMap.containsKey( name ) ) ||
          ( annName.equals( SEQUENCE_GENERATOR ) && !sequenceGeneratorMap.containsKey( name ) ) ||
          ( annName.equals( NAMED_QUERY ) && !namedQueryMap.containsKey( name ) ) ||
          ( annName.equals( NAMED_NATIVE_QUERY ) && !namedNativeQueryMap.containsKey( name ) ) ||
          ( annName.equals( SQL_RESULT_SET_MAPPING ) && !sqlResultSetMappingMap.containsKey( name ) );
    }
    if ( isNotExist ) {
      push( annName, annotationInstance );
    }
  }
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

  private void processDefaultJpaCallbacks(String instanceCallbackClassName, List<JpaCallbackClass> jpaCallbackClassList) {
    ClassInfo callbackClassInfo = getLocalBindingContext().getClassInfo( instanceCallbackClassName );

    // Process superclass first if available and not excluded
    if ( JandexHelper.getSingleAnnotation( callbackClassInfo, JPADotNames.EXCLUDE_SUPERCLASS_LISTENERS ) != null ) {
      DotName superName = callbackClassInfo.superName();
      if ( superName != null ) {
        processDefaultJpaCallbacks( instanceCallbackClassName, jpaCallbackClassList );
      }
    }
View Full Code Here

    ClassInfo callbackClassInfo = getLocalBindingContext().getClassInfo( instanceCallbackClassName );

    // Process superclass first if available and not excluded
    if ( JandexHelper.getSingleAnnotation( callbackClassInfo, JPADotNames.EXCLUDE_SUPERCLASS_LISTENERS ) != null ) {
      DotName superName = callbackClassInfo.superName();
      if ( superName != null ) {
        processJpaCallbacks(
            instanceCallbackClassName,
            isListener,
            callbackClassList
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

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.