Class FactoryParameterSelector
- java.lang.Object
-
- org.mapstruct.ap.internal.model.source.selector.FactoryParameterSelector
-
- All Implemented Interfaces:
MethodSelector
public class FactoryParameterSelector extends java.lang.Object implements MethodSelector
For factory methods, the candidate list is checked if it contains a method with a source parameter which is to be favored compared to factory methods without a source parameter. It returns the original list of candidates in case of ambiguities.
-
-
Constructor Summary
Constructors Constructor Description FactoryParameterSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Method>
java.util.List<SelectedMethod<T>>getMatchingMethods(Method mappingMethod, java.util.List<SelectedMethod<T>> methods, java.util.List<Type> sourceTypes, Type mappingTargetType, Type returnType, SelectionCriteria criteria)Selects those methods which match the given types and other criteria
-
-
-
Method Detail
-
getMatchingMethods
public <T extends Method> java.util.List<SelectedMethod<T>> getMatchingMethods(Method mappingMethod, java.util.List<SelectedMethod<T>> methods, java.util.List<Type> sourceTypes, Type mappingTargetType, Type returnType, SelectionCriteria criteria)
Description copied from interface:MethodSelectorSelects those methods which match the given types and other criteria- Specified by:
getMatchingMethodsin interfaceMethodSelector- Type Parameters:
T- either SourceMethod or BuiltInMethod- Parameters:
mappingMethod- mapping method, defined in Mapper for which this selection is carried outmethods- list of available methodssourceTypes- parameter type(s) that should be matchedmappingTargetType- mappingTargetType that should be matchedreturnType- return type that should be matchedcriteria- criteria used in the selection process- Returns:
- list of methods that passes the matching process
-
-