Class BeanInitializations<B>

java.lang.Object
io.micronaut.serde.support.util.BeanInitializations<B>
Type Parameters:
B - The bean type

@Internal public final class BeanInitializations<B> extends Object
The beans of one kind being initialized by the current thread, innermost last. A bean that refers back to a bean still being initialized, through a cycle of properties, holds the serdes of that bean, so it is bound to the document whenever that bean turns out to be, which is only known once that bean completes.
Since:
3.3.0
  • Constructor Details

    • BeanInitializations

      public BeanInitializations()
  • Method Details

    • enter

      public void enter(B bean)
      Records that the bean starts initializing.
      Parameters:
      bean - The bean
    • exit

      public void exit()
      Records that the innermost bean completed its initialization. The beans are initialized once, so the thread keeps nothing once the outermost one completes.
    • initializingWithin

      public List<B> initializingWithin(B bean)
      Parameters:
      bean - A bean still being initialized, reached again through a cycle
      Returns:
      The beans that started initializing after it, which depend on its serdes