|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.config.ConstructorArgumentValues
Holder for constructor argument values for a bean. Supports values for a specific index in the constructor argument list and generic matches by type.
Nested Class Summary | |
static class |
ConstructorArgumentValues.ValueHolder
Holder for a constructor argument value, with an optional type attribute indicating the target type of the actual constructor argument. |
Constructor Summary | |
ConstructorArgumentValues()
|
Method Summary | |
void |
addGenericArgumentValue(java.lang.Object value)
Add generic argument value to be matched by type. |
void |
addGenericArgumentValue(java.lang.Object value,
java.lang.String type)
Add generic argument value to be matched by type. |
void |
addIndexedArgumentValue(int index,
java.lang.Object value)
Add argument value for the given index in the constructor argument list. |
void |
addIndexedArgumentValue(int index,
java.lang.Object value,
java.lang.String type)
Add argument value for the given index in the constructor argument list. |
ConstructorArgumentValues.ValueHolder |
getArgumentValue(int index,
java.lang.Class requiredType)
Look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type. |
ConstructorArgumentValues.ValueHolder |
getGenericArgumentValue(java.lang.Class requiredType)
Look for a generic argument value that matches the given type. |
java.util.Set |
getGenericArgumentValues()
Return the set of generic argument values. |
ConstructorArgumentValues.ValueHolder |
getIndexedArgumentValue(int index,
java.lang.Class requiredType)
Get argument value for the given index in the constructor argument list. |
java.util.Map |
getIndexedArgumentValues()
Return the map of indexed argument values. |
int |
getNrOfArguments()
Return the number of arguments held in this instance. |
boolean |
isEmpty()
Return if this holder does not contain any argument values, neither indexed ones nor generic ones. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConstructorArgumentValues()
Method Detail |
public void addIndexedArgumentValue(int index, java.lang.Object value)
index
- the index in the constructor argument listvalue
- the argument valuepublic void addIndexedArgumentValue(int index, java.lang.Object value, java.lang.String type)
index
- the index in the constructor argument listvalue
- the argument valuepublic ConstructorArgumentValues.ValueHolder getIndexedArgumentValue(int index, java.lang.Class requiredType)
index
- the index in the constructor argument list
public java.util.Map getIndexedArgumentValues()
ConstructorArgumentValues.ValueHolder
public void addGenericArgumentValue(java.lang.Object value)
value
- the argument valuepublic void addGenericArgumentValue(java.lang.Object value, java.lang.String type)
value
- the argument valuepublic ConstructorArgumentValues.ValueHolder getGenericArgumentValue(java.lang.Class requiredType)
requiredType
- the type to match
public java.util.Set getGenericArgumentValues()
ConstructorArgumentValues.ValueHolder
public ConstructorArgumentValues.ValueHolder getArgumentValue(int index, java.lang.Class requiredType)
index
- the index in the constructor argument listrequiredType
- the type to match
public int getNrOfArguments()
public boolean isEmpty()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |