Class DefaultBeanResolutionContext

    • Constructor Detail

      • DefaultBeanResolutionContext

        public DefaultBeanResolutionContext​(BeanContext context,
                                            BeanDefinition<?> rootDefinition)
        Parameters:
        context - The bean context
        rootDefinition - The bean root definition
    • Method Detail

      • close

        public void close()
      • addInFlightBean

        public <T> void addInFlightBean​(BeanIdentifier beanIdentifier,
                                        BeanRegistration<T> beanRegistration)
        Description copied from interface: BeanResolutionContext
        Adds a bean that is created as part of the resolution. This is used to store references to instances passed to BeanContext.inject(Object)
        Type Parameters:
        T - The instance type
        Parameters:
        beanIdentifier - The bean identifier
        beanRegistration - The bean registration
      • removeInFlightBean

        public void removeInFlightBean​(BeanIdentifier beanIdentifier)
        Description copied from interface: BeanResolutionContext
        Removes a bean that is in the process of being created. This is used to store references to instances passed to BeanContext.inject(Object)
        Parameters:
        beanIdentifier - The bean identifier
      • getInFlightBean

        @Nullable
        public <T> BeanRegistration<T> getInFlightBean​(BeanIdentifier beanIdentifier)
        Description copied from interface: BeanResolutionContext
        Obtains an inflight bean for the given identifier. An "In Flight" bean is one that is currently being created but has not finished construction and been registered as a singleton just yet. For example in the case whereby a bean as a PostConstruct method that also triggers bean resolution of the same bean.
        Type Parameters:
        T - The bean type
        Parameters:
        beanIdentifier - The bean identifier
        Returns:
        The bean