public class BeanMetadataImpl extends ComponentMetadataImpl implements MutableBeanMetadata
activation, dependsOn, idSCOPE_PROTOTYPE, SCOPE_SINGLETONACTIVATION_EAGER, ACTIVATION_LAZY| Constructor and Description |
|---|
BeanMetadataImpl() |
BeanMetadataImpl(BeanMetadata source) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(BeanArgument argument) |
BeanArgument |
addArgument(Metadata value,
String valueType,
int index) |
void |
addProperty(BeanProperty property) |
BeanProperty |
addProperty(String name,
Metadata value) |
List<BeanArgument> |
getArguments()
Return the arguments for the factory method or constructor of the bean.
|
String |
getClassName()
Return the name of the class specified for the bean.
|
String |
getDestroyMethod()
Return the name of the destroy method specified for the bean.
|
Target |
getFactoryComponent()
Return the Metadata for the factory component on which to invoke the
factory method for the bean.
|
String |
getFactoryMethod()
Return the name of the factory method for the bean.
|
boolean |
getFieldInjection()
Whether the bean allows properties to be injected directly into its fields in the case
where an appropriate setter method is not available.
|
String |
getInitMethod()
Return the name of the init method specified for the bean.
|
List<BeanProperty> |
getProperties()
Return the properties for the bean.
|
Class |
getRuntimeClass()
Provide an actual class, this overrides the class name if set.
|
String |
getScope()
Return the scope for the bean.
|
boolean |
isProcessor() |
void |
removeArgument(BeanArgument argument) |
void |
removeProperty(BeanProperty property) |
void |
setArguments(List<BeanArgument> arguments) |
void |
setClassName(String className) |
void |
setDestroyMethod(String destroyMethodName) |
void |
setFactoryComponent(Target factoryComponent) |
void |
setFactoryMethod(String factoryMethodName) |
void |
setFieldInjection(boolean fieldInjection) |
void |
setInitMethod(String initMethodName) |
void |
setProcessor(boolean processor) |
void |
setProperties(List<BeanProperty> properties) |
void |
setRuntimeClass(Class runtimeClass) |
void |
setScope(String scope) |
String |
toString() |
addDependsOn, getActivation, getDependsOn, getId, removeDependsOn, setActivation, setDependsOn, setIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActivation, getDependsOn, getIdaddDependsOn, removeDependsOn, setActivation, setDependsOn, setIdpublic BeanMetadataImpl()
public BeanMetadataImpl(BeanMetadata source)
public String getClassName()
BeanMetadataclass attribute of the bean
definition.getClassName in interface BeanMetadatanull.public void setClassName(String className)
setClassName in interface MutableBeanMetadatapublic String getInitMethod()
BeanMetadatainit-method attribute of the bean
definition.getInitMethod in interface BeanMetadatanull if no init method is specified.public void setInitMethod(String initMethodName)
setInitMethod in interface MutableBeanMetadatapublic String getDestroyMethod()
BeanMetadatadestroy-method attribute of the
bean definition.getDestroyMethod in interface BeanMetadatanull if no destroy method is specified.public void setDestroyMethod(String destroyMethodName)
setDestroyMethod in interface MutableBeanMetadatapublic List<BeanArgument> getArguments()
BeanMetadataargument elements.getArguments in interface BeanMetadataBeanArgument objects for the factory
method or constructor of the bean. The List is empty if no
arguments are specified for the bean.public void setArguments(List<BeanArgument> arguments)
public void addArgument(BeanArgument argument)
addArgument in interface MutableBeanMetadatapublic BeanArgument addArgument(Metadata value, String valueType, int index)
addArgument in interface MutableBeanMetadatapublic void removeArgument(BeanArgument argument)
removeArgument in interface MutableBeanMetadatapublic List<BeanProperty> getProperties()
BeanMetadataproperty elements.getProperties in interface BeanMetadataBeanProperty objects, with one entry
for each property to be injected in the bean. The List is empty
if no property injection is specified for the bean.public void setProperties(List<BeanProperty> properties)
public void addProperty(BeanProperty property)
addProperty in interface MutableBeanMetadatapublic BeanProperty addProperty(String name, Metadata value)
addProperty in interface MutableBeanMetadatapublic void removeProperty(BeanProperty property)
removeProperty in interface MutableBeanMetadatapublic String getFactoryMethod()
BeanMetadatafactory-method attribute of the
bean.getFactoryMethod in interface BeanMetadatanull
if no factory method is specified for the bean.public void setFactoryMethod(String factoryMethodName)
setFactoryMethod in interface MutableBeanMetadatapublic Target getFactoryComponent()
BeanMetadatafactory-ref attribute of the bean.
When a factory method and factory component have been specified for the
bean, this method returns the factory component on which to invoke the
factory method for the bean. When no factory component has been specified
this method will return null.
When a factory method has been specified for the bean but a factory
component has not been specified, the factory method must be invoked as a
static method on the bean's class.
getFactoryComponent in interface BeanMetadatanull if no factory
component is specified.public void setFactoryComponent(Target factoryComponent)
setFactoryComponent in interface MutableBeanMetadatapublic String getScope()
BeanMetadatagetScope in interface BeanMetadataBeanMetadata.SCOPE_SINGLETON,
BeanMetadata.SCOPE_PROTOTYPEpublic void setScope(String scope)
setScope in interface MutableBeanMetadatapublic Class getRuntimeClass()
ExtendedBeanMetadatagetRuntimeClass in interface ExtendedBeanMetadatanull.public void setRuntimeClass(Class runtimeClass)
setRuntimeClass in interface MutableBeanMetadatapublic boolean isProcessor()
isProcessor in interface ExtendedBeanMetadatapublic void setProcessor(boolean processor)
setProcessor in interface MutableBeanMetadatapublic boolean getFieldInjection()
ExtendedBeanMetadatagetFieldInjection in interface ExtendedBeanMetadatapublic void setFieldInjection(boolean fieldInjection)
setFieldInjection in interface MutableBeanMetadataCopyright © 2013. All rights reserved.