|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xbean.blueprint.context.impl.NamedConstructorArgs
public class NamedConstructorArgs
NamedConstructorArgs is a BeanFactoryPostProcessor that converts property declarations into indexed constructor args based on the the constructor parameter names annotation. This process first selects a constructor and then fills in the constructor arguments from the properties defined in the bean definition. If a property is not defined in the bean definition, first the defaultValues map is checked for a value and if a value is not present a Java default value is provided for the constructor argument (e.g. numbers are assigned 0 and objects are assigned null).
Constructor Summary | |
---|---|
NamedConstructorArgs()
|
Method Summary | |
---|---|
void |
addDefaultValue(String name,
Class type,
String value)
Adds a default value for a property with the specified name and type. |
List<DefaultProperty> |
getDefaultValues()
Gets the default values that are assigned to constructor arguments without a defined value. |
void |
processParameters(org.apache.aries.blueprint.mutable.MutableBeanMetadata beanMetadata,
MappingMetaData metadata,
org.apache.aries.blueprint.ParserContext parserContext)
|
void |
setDefaultValues(List<DefaultProperty> defaultValues)
Sets the default values that are assigned to constructor arguments without a defined value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedConstructorArgs()
Method Detail |
---|
public List<DefaultProperty> getDefaultValues()
public void setDefaultValues(List<DefaultProperty> defaultValues)
defaultValues
- the values that are assigned to constructor arguments without a defined valuepublic void addDefaultValue(String name, Class type, String value)
name
- the name of the propertytype
- the type of the propertyvalue
- the default value for a property with the specified name and typepublic void processParameters(org.apache.aries.blueprint.mutable.MutableBeanMetadata beanMetadata, MappingMetaData metadata, org.apache.aries.blueprint.ParserContext parserContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |