Package io.avaje.inject


@NullMarked package io.avaje.inject
Avaje Inject API - see BeanScope.

   // Annotate classes with @Singleton, @Factory etc

   @Singleton
   public class CoffeeMaker { ... }

   @Singleton
   public class Pump { ... }

  --------------------------------------------------

   // Create BeanScope to wire and access beans

   BeanScope scope = BeanScope.builder()
     .build();

   // use it
   CoffeeMaker coffeeMaker = scope.get(CoffeeMaker.class);
   coffeeMaker.makeIt();

   // close it to fire preDestroy lifecycle methods
   scope.close();

 
  • Class
    Description
    Used with AssistFactory to mark the properties that are provided as parameters to the factory method.
    Annotate a bean for which we want to generate a factory.
    Marks methods on a @Factory bean that create dependencies.
    A bean entry with priority and optional name.
    Holds beans created by dependency injection.
    Build a bean scope with options for shutdown hook and supplying external dependencies.
    Extends the building with testing specific support for mocks and spies.
    Limits the types exposed by this bean to the given types.
    Identify a bean as component with singleton scope that avaje-inject will use.
    Specify types to generate DI classes for.
     
     
    Marks dependencies as an external beans potentially not managed by avaje inject.
    A singleton bean that has methods marked with the @Bean annotation.
    Used to explicitly specify whether the current module depends on/provides beans or aspects.
    Marks a class or factory method bean to be initialized lazily.
    Control whether a compile-time proxy is generated to support lazy initialization.
    The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization.
    The PreDestroy annotation is used on a method as a callback notification to signal that the instance is in the process of being removed by the container.
    Identify a bean as the preferred bean to inject when multiple beans implement the intended interface.
    The Priority annotation can be applied to classes to indicate the wiring priority of a bean to resolve cases where multiple beans of the same type exist.
    Expresses a requirement for a bean to be wired/registered into the BeanScope.
    Specify a bean that has prototype scope.
    Marks an Map<String, T> field/parameter to receive a map of beans keyed by qualifier name.
    Expresses a requirement for a bean to be wired/registered into the BeanScope.
     
    Expresses a requirement for a bean to be wired/registered into the BeanScope.
     
    Identify a bean as being the least preferred bean to inject when multiple beans implement the intended interface.