public class BeanMetadataImpl extends ComponentMetadataImpl implements MutableBeanMetadata
activation, dependsOn, id
SCOPE_PROTOTYPE, SCOPE_SINGLETON
ACTIVATION_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, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActivation, getDependsOn, getId
addDependsOn, removeDependsOn, setActivation, setDependsOn, setId
public BeanMetadataImpl()
public BeanMetadataImpl(BeanMetadata source)
public String getClassName()
BeanMetadata
class
attribute of the bean
definition.getClassName
in interface BeanMetadata
null
.public void setClassName(String className)
setClassName
in interface MutableBeanMetadata
public String getInitMethod()
BeanMetadata
init-method
attribute of the bean
definition.getInitMethod
in interface BeanMetadata
null
if no init method is specified.public void setInitMethod(String initMethodName)
setInitMethod
in interface MutableBeanMetadata
public String getDestroyMethod()
BeanMetadata
destroy-method
attribute of the
bean definition.getDestroyMethod
in interface BeanMetadata
null
if no destroy method is specified.public void setDestroyMethod(String destroyMethodName)
setDestroyMethod
in interface MutableBeanMetadata
public List<BeanArgument> getArguments()
BeanMetadata
argument elements.
getArguments
in interface BeanMetadata
BeanArgument
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 MutableBeanMetadata
public BeanArgument addArgument(Metadata value, String valueType, int index)
addArgument
in interface MutableBeanMetadata
public void removeArgument(BeanArgument argument)
removeArgument
in interface MutableBeanMetadata
public List<BeanProperty> getProperties()
BeanMetadata
property
elements.getProperties
in interface BeanMetadata
BeanProperty
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 MutableBeanMetadata
public BeanProperty addProperty(String name, Metadata value)
addProperty
in interface MutableBeanMetadata
public void removeProperty(BeanProperty property)
removeProperty
in interface MutableBeanMetadata
public String getFactoryMethod()
BeanMetadata
factory-method
attribute of the
bean.getFactoryMethod
in interface BeanMetadata
null
if no factory method is specified for the bean.public void setFactoryMethod(String factoryMethodName)
setFactoryMethod
in interface MutableBeanMetadata
public Target getFactoryComponent()
BeanMetadata
factory-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 BeanMetadata
null
if no factory
component is specified.public void setFactoryComponent(Target factoryComponent)
setFactoryComponent
in interface MutableBeanMetadata
public String getScope()
BeanMetadata
getScope
in interface BeanMetadata
BeanMetadata.SCOPE_SINGLETON
,
BeanMetadata.SCOPE_PROTOTYPE
public void setScope(String scope)
setScope
in interface MutableBeanMetadata
public Class getRuntimeClass()
ExtendedBeanMetadata
getRuntimeClass
in interface ExtendedBeanMetadata
null
.public void setRuntimeClass(Class runtimeClass)
setRuntimeClass
in interface MutableBeanMetadata
public boolean isProcessor()
isProcessor
in interface ExtendedBeanMetadata
public void setProcessor(boolean processor)
setProcessor
in interface MutableBeanMetadata
public boolean getFieldInjection()
ExtendedBeanMetadata
getFieldInjection
in interface ExtendedBeanMetadata
public void setFieldInjection(boolean fieldInjection)
setFieldInjection
in interface MutableBeanMetadata
Copyright © 2013. All Rights Reserved.