public class BeanCreationEvent extends EventObject
An event class for reporting the creation of a bean by the dependency injection framework.
Objects of this event class are received by BeanCreationListener
implementations, which can be registered at a BeanContext object.
Whenever the BeanContext is queried for a bean, and this bean has to
be newly created (e.g. because of the first access of a singleton bean or
because it is a factory bean), an event of this type is triggered.
source| Constructor and Description |
|---|
BeanCreationEvent(BeanContext source,
BeanProvider provider,
DependencyProvider depProvider,
Object newBean)
Creates a new instance of
BeanCreationEvent and initializes it. |
| Modifier and Type | Method and Description |
|---|---|
Object |
getBean()
Returns the newly created bean.
|
BeanContext |
getBeanContext()
Returns the
BeanContext that caused this event. |
BeanProvider |
getBeanProvider()
Returns the
BeanProvider that created the new bean. |
DependencyProvider |
getDependencyProvider()
Returns the
DependencyProvider involved in the bean creation
process. |
getSource, toStringpublic BeanCreationEvent(BeanContext source, BeanProvider provider, DependencyProvider depProvider, Object newBean)
BeanCreationEvent and initializes it.source - the BeanContext that caused this eventprovider - the BeanProvider that created the beandepProvider - the DependencyProvider used for creating the
beannewBean - the newly created beanpublic BeanContext getBeanContext()
BeanContext that caused this event.BeanContextpublic BeanProvider getBeanProvider()
BeanProvider that created the new bean.BeanProviderpublic DependencyProvider getDependencyProvider()
DependencyProvider involved in the bean creation
process. This is the object that was passed to the BeanProvider
when it created the new bean.DependencyProvider involved when creating the beanpublic Object getBean()
Copyright © 2016 The JGUIraffe Team. All rights reserved.