Package spoon.pattern.internal.parameter
Class ListParameterInfo
java.lang.Object
spoon.pattern.internal.parameter.AbstractParameterInfo
spoon.pattern.internal.parameter.ListParameterInfo
- All Implemented Interfaces:
ParameterInfo
-
Field Summary
Fields inherited from class spoon.pattern.internal.parameter.AbstractParameterInfo
NO_MERGE
Fields inherited from interface spoon.pattern.internal.parameter.ParameterInfo
UNLIMITED_OCCURRENCES
-
Constructor Summary
ConstructorDescriptionListParameterInfo(int idx, ParameterInfo next)
ListParameterInfo(ParameterInfo next)
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
addValueAs(Object container, Function<Object,Object> merger)
takes existing item value from the `container`, sends it as parameter into `merger` and get's new to be stored value stores that value into new `container` and returns itprotected <T> T
protected Object
getExistingValue(List<Object> list)
protected String
protected Object
getValue(ImmutableMap parameters)
protected String
getWrappedName(String containerName)
Methods inherited from class spoon.pattern.internal.parameter.AbstractParameterInfo
addValueAs, addValueToContainer, convertSingleValue, convertValue, getContainerKind, getContainerKind, getContainerKind, getContainerKindAccessor, getContainerName, getMatchingStrategy, getMaxOccurrences, getMinOccurrences, getName, getParameterValueType, getValueAs, getValueConvertor, isMandatory, isMultiple, isRepeatable, isTryNextMatch, matches, merge, mergeSingle, setContainerKind, setMatchCondition, setMatchingStrategy, setMaxOccurrences, setMinOccurrences, setParameterValueType, setRepeatable, setValueConvertor, toString
-
Constructor Details
-
ListParameterInfo
-
ListParameterInfo
-
-
Method Details
-
getPlainName
- Specified by:
getPlainName
in classAbstractParameterInfo
-
getWrappedName
- Specified by:
getWrappedName
in classAbstractParameterInfo
-
addValueAs
Description copied from class:AbstractParameterInfo
takes existing item value from the `container`, sends it as parameter into `merger` and get's new to be stored value stores that value into new `container` and returns it- Specified by:
addValueAs
in classAbstractParameterInfo
- Parameters:
container
- a container of valuesmerger
- a code which merges existing value from container with new value and returns merged value, which has to be stored in the container instead- Returns:
- copy of the container with merged value
-
getExistingValue
-
getEmptyContainer
- Specified by:
getEmptyContainer
in classAbstractParameterInfo
-
getValue
- Overrides:
getValue
in classAbstractParameterInfo
-
castTo
- Overrides:
castTo
in classAbstractParameterInfo
-