|
||||||||||
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 java.lang.String |
KEY
|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
|
Jsr250Metadata(DeploymentUnitMetadata deploymentUnitMetadata,
java.lang.String name,
java.lang.Class<?> componentClass)
Construct new component metadata |
protected |
Jsr250Metadata(Jsr250Metadata other)
Copy constructor. |
Method Summary | |
---|---|
void |
addInjection(Injection<?> injection)
|
protected void |
applyInjections(java.lang.Object instance,
java.util.List<? extends Injection<?>> injections)
Apply the given injection list into the passed object. |
org.springframework.beans.factory.support.AbstractBeanDefinition |
getBeanDefinition()
Return the Spring singleton definition that this additional metadata relates to |
protected org.springframework.beans.factory.support.BeanDefinitionRegistry |
getBeanDefinitionRegistry()
|
java.lang.Class<?> |
getComponentClass()
|
org.springframework.context.ApplicationContext |
getComponentContext()
|
java.lang.String |
getComponentName()
|
DeploymentUnitMetadata |
getDeploymentUnitMetadata()
|
java.util.List<Injection<?>> |
getInjections()
|
java.util.List<java.lang.reflect.Method> |
getLifecycleEventCallbackMethod(LifecycleEvent le)
Null if childPostConstruct annotation not found |
java.lang.Object |
getUniqueInstanceOfType(org.springframework.beans.factory.ListableBeanFactory lbf,
java.lang.Class type)
|
void |
inject(java.lang.Object instance)
Perform dependency injection on the given instance and invoke the PostConstruct method if any |
void |
injectAndPostConstruct(java.lang.Object instance)
Perform dependency injection on the given instance and invoke the PostConstruct method if any |
protected boolean |
invokeLifecycleMethod(java.lang.Object bean,
java.lang.reflect.Method lifecyleMethod)
|
boolean |
invokeLifecycleMethod(java.lang.Object bean,
java.lang.reflect.Method lifecyleMethod,
java.lang.Object[] args)
|
void |
invokeLifecycleMethods(java.lang.Object bean,
LifecycleEvent le)
|
protected void |
invokePostConstructAndRegisterShutdownHook(java.lang.Object instance)
|
void |
refresh()
|
void |
registerLifecycleEventCallbackMethod(LifecycleEvent le,
java.lang.reflect.Method m)
|
protected java.lang.Object |
resolve(Injection injection)
Resolve the given injected value Look first in the Spring singleton factory, then in JNDI name |
protected java.lang.Object |
resolveByType(java.lang.Class type)
Subclasses that know about a context can perform special purpose injection here |
void |
setBeanDefinition(org.springframework.beans.factory.support.AbstractBeanDefinition bd)
|
void |
setComponentContext(org.springframework.context.ApplicationContext beanFactoryForInstance,
org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
|
void |
setComponentContext(org.springframework.context.support.GenericApplicationContext gac)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KEY
protected final org.apache.commons.logging.Log log
Constructor Detail |
---|
protected Jsr250Metadata(Jsr250Metadata other)
other
- other metadata object to copy field state frompublic Jsr250Metadata(DeploymentUnitMetadata deploymentUnitMetadata, java.lang.String name, java.lang.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 java.lang.String getComponentName()
public java.lang.Class<?> getComponentClass()
public void setComponentContext(org.springframework.context.ApplicationContext beanFactoryForInstance, org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
public final void setComponentContext(org.springframework.context.support.GenericApplicationContext gac)
public void setBeanDefinition(org.springframework.beans.factory.support.AbstractBeanDefinition bd)
protected org.springframework.beans.factory.support.BeanDefinitionRegistry getBeanDefinitionRegistry()
public org.springframework.context.ApplicationContext getComponentContext()
public void registerLifecycleEventCallbackMethod(LifecycleEvent le, java.lang.reflect.Method m)
public java.util.List<java.lang.reflect.Method> getLifecycleEventCallbackMethod(LifecycleEvent le)
public org.springframework.beans.factory.support.AbstractBeanDefinition getBeanDefinition()
public void addInjection(Injection<?> injection)
public java.util.List<Injection<?>> getInjections()
public java.lang.String toString()
toString
in class java.lang.Object
public void inject(java.lang.Object instance)
instance
- newly instantiated bean instance. If it is null, static
members will be used.protected void applyInjections(java.lang.Object instance, java.util.List<? extends Injection<?>> injections)
instance
- injections
- public void injectAndPostConstruct(java.lang.Object instance)
instance
- newly instantiated singleton instanceprotected void invokePostConstructAndRegisterShutdownHook(java.lang.Object instance)
protected java.lang.Object resolve(Injection injection)
injection
- injection metadata
protected java.lang.Object resolveByType(java.lang.Class type) throws org.springframework.beans.factory.NoSuchBeanDefinitionException
type
-
org.springframework.beans.factory.NoSuchBeanDefinitionException
public java.lang.Object getUniqueInstanceOfType(org.springframework.beans.factory.ListableBeanFactory lbf, java.lang.Class type)
public void invokeLifecycleMethods(java.lang.Object bean, LifecycleEvent le)
protected boolean invokeLifecycleMethod(java.lang.Object bean, java.lang.reflect.Method lifecyleMethod)
public boolean invokeLifecycleMethod(java.lang.Object bean, java.lang.reflect.Method lifecyleMethod, java.lang.Object[] args)
public DeploymentUnitMetadata getDeploymentUnitMetadata()
public void refresh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |