Class SpringDIProcessor

java.lang.Object
io.quarkus.spring.di.deployment.SpringDIProcessor

public class SpringDIProcessor extends Object
A simple processor that maps Spring DI annotations to CDI annotations. Arc's handling of annotation mapping (by creating an extra abstraction layer on top of the Jandex index) suits this sort of handling perfectly.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final org.jboss.jandex.DotName
     
    (package private) static final org.jboss.jandex.DotName
     
    (package private) static final org.jboss.jandex.DotName
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) io.quarkus.arc.deployment.AnnotationsTransformerBuildItem
    beanTransformer(io.quarkus.arc.deployment.BeanArchiveIndexBuildItem beanArchiveIndexBuildItem, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.arc.deployment.StereotypeRegistrarBuildItem> stereotypeRegistrarProducer)
     
    createBeanNamesMap(io.quarkus.arc.deployment.BeanArchiveIndexBuildItem beanArchiveIndexBuildItem)
     
    (package private) Set<org.jboss.jandex.AnnotationInstance>
    getAnnotationsToAdd(org.jboss.jandex.AnnotationTarget target, Map<org.jboss.jandex.DotName,Set<org.jboss.jandex.DotName>> stereotypeScopes, List<org.jboss.jandex.DotName> allArcScopes)
    Map spring annotations from an annotated class to equivalent CDI annotations
    (package private) Map<org.jboss.jandex.DotName,Set<org.jboss.jandex.DotName>>
    getStereotypeScopes(org.jboss.jandex.IndexView index)
     
    (package private) io.quarkus.deployment.builditem.FeatureBuildItem
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SPRING_COMPONENT

      static final org.jboss.jandex.DotName SPRING_COMPONENT
    • SPRING_SERVICE

      static final org.jboss.jandex.DotName SPRING_SERVICE
    • SPRING_REPOSITORY

      static final org.jboss.jandex.DotName SPRING_REPOSITORY
  • Constructor Details

    • SpringDIProcessor

      public SpringDIProcessor()
  • Method Details

    • registerFeature

      io.quarkus.deployment.builditem.FeatureBuildItem registerFeature()
    • createBeanNamesMap

      SpringBeanNameToDotNameBuildItem createBeanNamesMap(io.quarkus.arc.deployment.BeanArchiveIndexBuildItem beanArchiveIndexBuildItem)
    • beanTransformer

      io.quarkus.arc.deployment.AnnotationsTransformerBuildItem beanTransformer(io.quarkus.arc.deployment.BeanArchiveIndexBuildItem beanArchiveIndexBuildItem, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.arc.deployment.StereotypeRegistrarBuildItem> stereotypeRegistrarProducer)
    • getStereotypeScopes

      Map<org.jboss.jandex.DotName,Set<org.jboss.jandex.DotName>> getStereotypeScopes(org.jboss.jandex.IndexView index)
      Parameters:
      index - An index view of the archive including all the spring classes
      Returns:
      A map of any spring annotations extending @Component which will function like CDI stereotypes to any scopes it, or any of its stereotypes declared.
    • getAnnotationsToAdd

      Set<org.jboss.jandex.AnnotationInstance> getAnnotationsToAdd(org.jboss.jandex.AnnotationTarget target, Map<org.jboss.jandex.DotName,Set<org.jboss.jandex.DotName>> stereotypeScopes, List<org.jboss.jandex.DotName> allArcScopes)
      Map spring annotations from an annotated class to equivalent CDI annotations
      Parameters:
      target - The annotated class
      stereotypeScopes - A map on spring stereotype classes to all the scopes they, or any of their stereotypes (etc.) declare
      Returns:
      The CDI annotations to add to the class