Package io.micronaut.context.scope
Interface CreatedBean<T>
- Type Parameters:
T
- The bean type
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
BeanRegistration
Represents a bean that has been created from a
BeanCreationContext
.- Since:
- 3.0.0
- Author:
- graemerocher
- See Also:
-
Method Details
-
definition
BeanDefinition<T> definition()- Returns:
- The bean definition.
-
bean
- Returns:
- The bean
-
id
BeanIdentifier id()Returns an ID that is unique to the bean and can be used to cache the instance if necessary.- Returns:
- The id
-
close
Destroy the bean entry, performing any shutdown and releasing any dependent objects.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
BeanDestructionException
- If an error occurs closing the created bean.
-