Annotation Type Component.Import

Enclosing class:
Component

Specify types to generate DI classes for.

These types are typically in an external project / dependency or otherwise types that we can't or don't want to explicitly annotate with @Singleton/@Component.

Typically, we put this annotation on a package/module-info.

Component.Import({CustomerService.class, ProductService.class, ...})
package org.example.processor;

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<?>[]
    Types to generate DI classes for.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    What kind of bean