Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


      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 candidates.contains( annName );
  }

  @Override
  public void beforePush(IndexBuilder indexBuilder, DotName classDotName, AnnotationInstance annotationInstance) {
    DotName annName = annotationInstance.name();
    if ( !match( annName ) ) {
      return;
    }
    Map<DotName, List<AnnotationInstance>> map = indexBuilder.getIndexedAnnotations( classDotName );
    overrideIndexedAnnotationMap( annName, annotationInstance, map );
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

  ClassInfo createClassInfo(String className) {
    if ( StringHelper.isEmpty( className ) ) {
      throw new AssertionFailure( "Class Name used to create ClassInfo is empty." );
    }
    DotName classDotName = DotName.createSimple( className );
    if ( classes.containsKey( classDotName ) ) {
      //classInfoAnnotationsMap.put( classDotName, new HashMap<DotName, List<AnnotationInstance>>(classes.get( classDotName ).annotations()) );
      return classes.get( classDotName );
    }
    Class clazz = serviceRegistry.getService( ClassLoaderService.class ).classForName( className );
    DotName superName = null;
    DotName[] interfaces = null;
    short access_flag;
    ClassInfo annClassInfo = index.getClassByName( classDotName );
    if ( annClassInfo != null ) {
      superName = annClassInfo.superName();
View Full Code Here

    if ( source != null ) {
      for ( Map.Entry<DotName, List<AnnotationInstance>> el : source.entrySet() ) {
        if ( el.getValue().isEmpty() ) {
          continue;
        }
        DotName annotationName = el.getKey();
        List<AnnotationInstance> value = el.getValue();
        List<AnnotationInstance> annotationInstanceList = target.get( annotationName );
        if ( annotationInstanceList == null ) {
          annotationInstanceList = new ArrayList<AnnotationInstance>();
          target.put( annotationName, annotationInstanceList );
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

            }

            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

            final Set<Class<?>> discoveredClasses = new HashSet<Class<?>>();
            instances.put(annotation.annotationClass, discoveredClasses);
            for (AnnotationInstance annotationInstance : annotationInstances) {
                final AnnotationTarget target = annotationInstance.target();
                if (target instanceof ClassInfo) {
                    final DotName className = ClassInfo.class.cast(target).name();
                    final Class<?> annotatedClass;
                    try {
                        annotatedClass = classLoader.loadClass(className.toString());
                    } catch (ClassNotFoundException e) {
                        throw new DeploymentUnitProcessingException(JSFMessages.MESSAGES.classLoadingFailed(className));
                    }
                    discoveredClasses.add(annotatedClass);
                } else {
View Full Code Here

        } else {
            localContextName = declaredName;
        }

        //final AnnotationValue declaredTypeValue = annotation.value("type");
        final DotName declaredTypeDotName = fieldInfo.type().name();
        final DotName injectionTypeDotName = declaredTypeDotName == null || declaredTypeDotName.toString().equals(Object.class.getName()) ? fieldInfo.type().name() : declaredTypeDotName;

        final String injectionType = injectionTypeDotName.toString();
        final InjectionSource bindingSource = this.getBindingSource(deploymentUnit, annotation, injectionType, eeModuleClassDescription);
        if (bindingSource != null) {
            final BindingConfiguration bindingConfiguration = new BindingConfiguration(localContextName, bindingSource);
            // add the binding configuration to the class description
            eeModuleClassDescription.getConfigurators().add(new ClassConfigurator() {
View Full Code Here

            throw new DeploymentUnitProcessingException("Unable to resolve annotation index for deployment unit " + deploymentUnit);
        }

        // Find classes which extend, implement, or are annotated by HandlesTypes
        for (Class<?> type : typesArray) {
            DotName className = DotName.createSimple(type.getName());
            Set<ClassInfo> classInfos = processHandlesType(className, type, index);
            Set<Class<?>> classes = loadClassInfoSet(classInfos, classLoader);
            Set<ServletContainerInitializer> sciSet = typesMap.get(type);
            for (ServletContainerInitializer sci : sciSet) {
                handlesTypes.get(sci).addAll(classes);
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.