java.lang.Object | |
↳ | org.springframework.beans.factory.config.ConstructorArgumentValues |
Holder for constructor argument values, typically as part of a bean definition.
Supports values for a specific index in the constructor argument list as well as for generic argument matches by type.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ConstructorArgumentValues.ValueHolder | Holder for a constructor argument value, with an optional type attribute indicating the target type of the actual constructor argument. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new empty ConstructorArgumentValues object.
| |||||||||||
Deep copy constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Copy all given argument values into this object, using separate holder
instances to keep the values independent from the original object.
| |||||||||||
Add a generic argument value to be matched by type.
| |||||||||||
Add a generic argument value to be matched by type or name (if available).
| |||||||||||
Add a generic argument value to be matched by type.
| |||||||||||
Add an argument value for the given index in the constructor argument list.
| |||||||||||
Add an argument value for the given index in the constructor argument list.
| |||||||||||
Add an argument value for the given index in the constructor argument list.
| |||||||||||
Clear this holder, removing all argument values.
| |||||||||||
Return the number of argument values held in this instance,
counting both indexed and generic argument values.
| |||||||||||
Look for an argument value that either corresponds to the given index
in the constructor argument list or generically matches by type.
| |||||||||||
Look for an argument value that either corresponds to the given index
in the constructor argument list or generically matches by type.
| |||||||||||
Look for an argument value that either corresponds to the given index
in the constructor argument list or generically matches by type.
| |||||||||||
Look for a generic argument value that matches the given type.
| |||||||||||
Look for a generic argument value that matches the given type.
| |||||||||||
Look for the next generic argument value that matches the given type,
ignoring argument values that have already been used in the current
resolution process.
| |||||||||||
Return the list of generic argument values.
| |||||||||||
Get argument value for the given index in the constructor argument list.
| |||||||||||
Get argument value for the given index in the constructor argument list.
| |||||||||||
Return the map of indexed argument values.
| |||||||||||
Check whether an argument value has been registered for the given index.
| |||||||||||
Return if this holder does not contain any argument values,
neither indexed ones nor generic ones.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a new empty ConstructorArgumentValues object.
Deep copy constructor.
original | the ConstructorArgumentValues to copy |
---|
Copy all given argument values into this object, using separate holder instances to keep the values independent from the original object.
Note: Identical ValueHolder instances will only be registered once, to allow for merging and re-merging of argument value definitions. Distinct ValueHolder instances carrying the same content are of course allowed.
Add a generic argument value to be matched by type.
Note: A single generic argument value will just be used once, rather than matched multiple times.
value | the argument value |
---|
Add a generic argument value to be matched by type or name (if available).
Note: A single generic argument value will just be used once, rather than matched multiple times.
newValue | the argument value in the form of a ValueHolder
Note: Identical ValueHolder instances will only be registered once, to allow for merging and re-merging of argument value definitions. Distinct ValueHolder instances carrying the same content are of course allowed. |
---|
Add a generic argument value to be matched by type.
Note: A single generic argument value will just be used once, rather than matched multiple times.
value | the argument value |
---|---|
type | the type of the constructor argument |
Add an argument value for the given index in the constructor argument list.
index | the index in the constructor argument list |
---|---|
value | the argument value |
Add an argument value for the given index in the constructor argument list.
index | the index in the constructor argument list |
---|---|
value | the argument value |
type | the type of the constructor argument |
Add an argument value for the given index in the constructor argument list.
index | the index in the constructor argument list |
---|---|
newValue | the argument value in the form of a ValueHolder |
Return the number of argument values held in this instance, counting both indexed and generic argument values.
Look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type.
index | the index in the constructor argument list |
---|---|
requiredType | the type to match |
null
if none set
Look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type.
index | the index in the constructor argument list |
---|---|
requiredType | the type to match (can be null to find
an untyped argument value) |
usedValueHolders | a Set of ValueHolder objects that have already been used in the current resolution process and should therefore not be returned again (allowing to return the next generic argument match in case of multiple generic argument values of the same type) |
null
if none set
Look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type.
index | the index in the constructor argument list |
---|---|
requiredType | the type to match |
requiredName | the name to match |
null
if none set
Look for a generic argument value that matches the given type.
requiredType | the type to match |
---|---|
requiredName | the name to match |
null
if none set
Look for a generic argument value that matches the given type.
requiredType | the type to match |
---|
null
if none set
Look for the next generic argument value that matches the given type, ignoring argument values that have already been used in the current resolution process.
requiredType | the type to match (can be null to find
an arbitrary next generic argument value) |
---|---|
requiredName | the name to match (can be null to not
match argument values by name) |
usedValueHolders | a Set of ValueHolder objects that have already been used in the current resolution process and should therefore not be returned again |
null
if none found
Return the list of generic argument values.
Get argument value for the given index in the constructor argument list.
index | the index in the constructor argument list |
---|---|
requiredType | the type to match (can be null to match
untyped values only) |
requiredName | the type to match (can be null to match
unnamed values only) |
null
if none set
Get argument value for the given index in the constructor argument list.
index | the index in the constructor argument list |
---|---|
requiredType | the type to match (can be null to match
untyped values only) |
null
if none set
Return the map of indexed argument values.
Check whether an argument value has been registered for the given index.
index | the index in the constructor argument list |
---|
Return if this holder does not contain any argument values, neither indexed ones nor generic ones.