Package io.micronaut.context.scope
Interface BeanCreationContext<T>
- Type Parameters:
T
- The bean type
public interface BeanCreationContext<T>
Context object passed to
CustomScope
instances for creating new beans.- Since:
- 3.0
-
Method Details
-
definition
- Returns:
- The bean definition
-
id
- Returns:
- An ID that can be used to store the created bean instance
-
create
Create a new instance.Implementations of
CustomScope
should callCreatedBean.close()
to dispose of the bean at the appropriate moment in the lifecycle of the scope- Returns:
- The
CreatedBean
instance - Throws:
BeanCreationException
- If the bean failed to create
-