|
||||||||||
| 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(DeploymentUnitMetadata deploymentUnitMetadata,
String name,
Class<?> componentClass)
Construct new component metadata |
protected |
Jsr250Metadata(Jsr250Metadata other)
Copy constructor. |
| Method Summary | |
|---|---|
void |
addInjection(Injection<?> injection)
|
protected void |
applyInjections(Object instance,
List<? extends Injection<?>> 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<Injection<?>> |
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(Injection 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 from
public Jsr250Metadata(DeploymentUnitMetadata 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 component| Method Detail |
|---|
public String getComponentName()
public Class<?> getComponentClass()
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)
public List<Method> getLifecycleEventCallbackMethod(LifecycleEvent le)
public AbstractBeanDefinition getBeanDefinition()
public void addInjection(Injection<?> injection)
public List<Injection<?>> getInjections()
public String toString()
toString in class Objectpublic void inject(Object instance)
instance - newly instantiated bean instance. If it is null, static
members will be used.
protected void applyInjections(Object instance,
List<? extends Injection<?>> injections)
instance - injections - public void injectAndPostConstruct(Object instance)
instance - newly instantiated singleton instanceprotected void invokePostConstructAndRegisterShutdownHook(Object instance)
protected Object resolve(Injection 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)
protected boolean invokeLifecycleMethod(Object bean,
Method lifecyleMethod)
public boolean invokeLifecycleMethod(Object bean,
Method lifecyleMethod,
Object[] args)
public DeploymentUnitMetadata getDeploymentUnitMetadata()
public void refresh()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||