Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


        } 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


     * @param rootBda      The root bda, this is used as the BDA of last resort if the correct BDA cannot be found
     * @param indexes      The jandex indexes
     * @return The correct BDA for the EJB
     */
    private BeanDeploymentArchiveImpl resolveComponentBda(String ejbClassName, Map<ResourceRoot, BeanDeploymentArchiveImpl> bdaMap, BeanDeploymentArchiveImpl rootBda, Map<ResourceRoot, Index> indexes) {
        final DotName className = DotName.createSimple(ejbClassName);
        for (Map.Entry<ResourceRoot, BeanDeploymentArchiveImpl> entry : bdaMap.entrySet()) {
            final Index index = indexes.get(entry.getKey());
            if (index != null) {
                if (index.getClassByName(className) != null) {
                    return entry.getValue();
View Full Code Here

     * @param rootBda      The root bda, this is used as the BDA of last resort if the correct BDA cannot be found
     * @param indexes      The jandex indexes
     * @return The correct BDA for the EJB
     */
    private BeanDeploymentArchiveImpl resolveComponentBda(String ejbClassName, Map<ResourceRoot, BeanDeploymentArchiveImpl> bdaMap, BeanDeploymentArchiveImpl rootBda, Map<ResourceRoot, Index> indexes) {
        final DotName className = DotName.createSimple(ejbClassName);
        for (Map.Entry<ResourceRoot, BeanDeploymentArchiveImpl> entry : bdaMap.entrySet()) {
            final Index index = indexes.get(entry.getKey());
            if (index != null) {
                if (index.getClassByName(className) != null) {
                    return entry.getValue();
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

   * @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

   * 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

        if(names.size() != 1) {
            return null;
        }
        //now we have an interface, but it is not an implicit local interface
        //if it is annotated @Remote
        final DotName iface = names.iterator().next();
        final ClassInfo classInfo = index.getClassByName(iface);
        if(classInfo == null) {
            logger.warnf("Could not read annotations in interface %s when determining local interfaces for %s",iface, sessionBeanClass.name());
            return null;
        }
        List<AnnotationInstance> annotations = classInfo.annotations().get(REMOTE);
        if(annotations == null || annotations.isEmpty()) {
            return iface.toString();
        }
        for(AnnotationInstance annotation : annotations) {
            if(annotation.target() instanceof ClassInfo) {
                return null;
            }
        }

        return iface.toString();
    }
View Full Code Here

        }
        this.processLockAnnotations(beanClass, compositeIndex, componentDescription);
    }

    private void processLockAnnotations(ClassInfo beanClass, CompositeIndex compositeIndex, SessionBeanComponentDescription componentDescription) throws DeploymentUnitProcessingException {
        final DotName superName = beanClass.superName();
        if (superName != null) {
            ClassInfo superClass = compositeIndex.getClassByName(superName);
            if (superClass != null)
                processLockAnnotations(superClass, compositeIndex, componentDescription);
        }
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.