|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jee.inject.Jsr250Metadata
public class Jsr250Metadata
Metadata for JEE 5 injection. Can be supplemented by component-specific metadata such as EJB metadata. Each JeeMetadata is associated with a Spring BeanDefinition and attached as a custom attribute
BeanDefinition
Field Summary | |
---|---|
static String |
KEY
|
protected Log |
log
|
Constructor Summary | |
---|---|
|
Jsr250Metadata(DeploymentUnitMetadataI deploymentUnitMetadata,
String name,
Class<?> componentClass)
Construct new component metadata |
protected |
Jsr250Metadata(Jsr250Metadata other)
Copy constructor. |
Method Summary | |
---|---|
void |
addInjection(InjectionI<?> injection)
|
protected void |
applyInjections(Object instance,
List<? extends InjectionI<?>> injections)
Apply the given injection list into the passed object. |
AbstractBeanDefinition |
getBeanDefinition()
Return the Spring singleton definition that this additional metadata relates to |
protected BeanDefinitionRegistry |
getBeanDefinitionRegistry()
|
Class<?> |
getComponentClass()
|
ApplicationContext |
getComponentContext()
|
String |
getComponentName()
|
DeploymentUnitMetadata |
getDeploymentUnitMetadata()
|
List<InjectionI<?>> |
getInjections()
|
List<Method> |
getLifecycleEventCallbackMethod(LifecycleEvent le)
Null if childPostConstruct annotation not found |
Object |
getUniqueInstanceOfType(ListableBeanFactory lbf,
Class type)
|
void |
inject(Object instance)
Perform dependency injection on the given instance and invoke the PostConstruct method if any |
void |
injectAndPostConstruct(Object instance)
Perform dependency injection on the given instance and invoke the PostConstruct method if any |
protected boolean |
invokeLifecycleMethod(Object bean,
Method lifecyleMethod)
|
boolean |
invokeLifecycleMethod(Object bean,
Method lifecyleMethod,
Object[] args)
|
void |
invokeLifecycleMethods(Object bean,
LifecycleEvent le)
|
protected void |
invokePostConstructAndRegisterShutdownHook(Object instance)
|
void |
refresh()
|
void |
registerLifecycleEventCallbackMethod(LifecycleEvent le,
Method m)
|
protected Object |
resolve(InjectionI injection)
Resolve the given injected value Look first in the Spring singleton factory, then in JNDI name |
protected Object |
resolveByType(Class type)
Subclasses that know about a context can perform special purpose injection here |
void |
setBeanDefinition(AbstractBeanDefinition bd)
|
void |
setComponentContext(ApplicationContext beanFactoryForInstance,
BeanDefinitionRegistry bdr)
|
void |
setComponentContext(GenericApplicationContext gac)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String KEY
protected final Log log
Constructor Detail |
---|
protected Jsr250Metadata(Jsr250Metadata other)
other
- other metadata object to copy field state frompublic Jsr250Metadata(DeploymentUnitMetadataI deploymentUnitMetadata, String name, Class<?> componentClass)
deploymentUnitMetadata
- metadata for whole deployment. This
metadata will be added to indicate the new component to be
deployedname
- name of the componentcomponentClass
- class of the componentMethod Detail |
---|
public String getComponentName()
getComponentName
in interface Jsr250MetadataI
public Class<?> getComponentClass()
getComponentClass
in interface Jsr250MetadataI
public void setComponentContext(ApplicationContext beanFactoryForInstance, BeanDefinitionRegistry bdr)
public final void setComponentContext(GenericApplicationContext gac)
public void setBeanDefinition(AbstractBeanDefinition bd)
protected BeanDefinitionRegistry getBeanDefinitionRegistry()
public ApplicationContext getComponentContext()
public void registerLifecycleEventCallbackMethod(LifecycleEvent le, Method m)
registerLifecycleEventCallbackMethod
in interface Jsr250MetadataI
public List<Method> getLifecycleEventCallbackMethod(LifecycleEvent le)
getLifecycleEventCallbackMethod
in interface Jsr250MetadataI
public AbstractBeanDefinition getBeanDefinition()
public void addInjection(InjectionI<?> injection)
addInjection
in interface Jsr250MetadataI
public List<InjectionI<?>> getInjections()
getInjections
in interface Jsr250MetadataI
public String toString()
toString
in class Object
public void inject(Object instance)
inject
in interface Jsr250MetadataI
instance
- newly instantiated bean instance. If it is null, static
members will be used.protected void applyInjections(Object instance, List<? extends InjectionI<?>> injections)
instance
- injections
- public void injectAndPostConstruct(Object instance)
instance
- newly instantiated singleton instanceprotected void invokePostConstructAndRegisterShutdownHook(Object instance)
protected Object resolve(InjectionI injection)
injection
- injection metadata
protected Object resolveByType(Class type) throws NoSuchBeanDefinitionException
type
-
NoSuchBeanDefinitionException
public Object getUniqueInstanceOfType(ListableBeanFactory lbf, Class type)
public void invokeLifecycleMethods(Object bean, LifecycleEvent le)
invokeLifecycleMethods
in interface Jsr250MetadataI
protected boolean invokeLifecycleMethod(Object bean, Method lifecyleMethod)
public boolean invokeLifecycleMethod(Object bean, Method lifecyleMethod, Object[] args)
public DeploymentUnitMetadata getDeploymentUnitMetadata()
getDeploymentUnitMetadata
in interface Jsr250MetadataI
public void refresh()
refresh
in interface Jsr250MetadataI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |