Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


    }

    public static boolean isJaxwsService(final ClassInfo current, final Index index) {
        ClassInfo tmp = current;
        while (tmp != null) {
            final DotName superName = tmp.superName();
            if (JAXWS_SERVICE_CLASS.equals(superName)) {
                return true;
            }
            tmp = index.getClassByName(superName);
        }
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);
            eeModuleClassDescription.getBindingConfigurations().add(bindingConfiguration);
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) {
                String className = annotationInstance.target().toString();
                try {
                    log.tracef("getClassesInJar found class %s with annotation %s", className, annClass.getName());
View Full Code Here

     * @param jaxws if passed value is <b>true</b> JAXWS servlets list will be returned, otherwise JAXRPC servlets list
     * @return either JAXRPC or JAXWS servlets list
     */
    public static <T extends ServletMetaData> List<ServletMetaData> selectWebServiceServlets(final Index annotationIndex, final Collection<T> smd, final boolean jaxws) {
        final List<ServletMetaData> endpoints = new ArrayList<ServletMetaData>();
        final DotName webserviceAnnotation = DotName.createSimple(WebService.class.getName());
        final DotName webserviceProviderAnnotation = DotName.createSimple(WebServiceProvider.class.getName());

        if(smd != null) for (ServletMetaData servletMD : smd) {
                final String endpointClassName = ASHelper.getEndpointName(servletMD);
                if (endpointClassName != null && endpointClassName.length() > 0) { // exclude JSP
                    // check webservice annotations
View Full Code Here

    }
    return annotations;
  }

  public 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

      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 classLoaderService;
  }

  public ClassInfo getClassInfo(String className) {
    DotName dotName = DotName.createSimple( className );
    return index.getClassByName( dotName );
  }
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.