Source:
public IterableMappingMethod build() { Type sourceParameterType = first( method.getSourceParameters() ).getType(); Type resultType = method.getResultType(); Type sourceElementType = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType() : first( sourceParameterType.getTypeParameters() ).getTypeBound(); Type targetElementType = resultType.isArrayType() ? resultType.getComponentType() : first( resultType.getTypeParameters() ).getTypeBound(); String loopVariableName = Strings.getSaveVariableName( sourceElementType.getName(), method.getParameterNames() ); Assignment assignment = ctx.getMappingResolver().getTargetAssignment( method, "collection element", sourceElementType, targetElementType, null, dateFormat, qualifiers, qualifyingElementTargetType, loopVariableName, false ); if ( method instanceof ForgedMethod ) { method.getThrownTypes().addAll( assignment.getThrownTypes() ); } if ( assignment == null ) { ctx.getMessager().printMessage( method.getExecutable(), Message.ITERABLEMAPPING_MAPPING_NOT_FOUND ); } if ( resultType.isArrayType() ) { assignment = new LocalVarWrapper( assignment, method.getThrownTypes() ); } else { assignment = new SetterWrapper( assignment, method.getThrownTypes() ); } boolean mapNullToDefault = false; if ( method.getMapperConfiguration() != null ) { mapNullToDefault = method.getMapperConfiguration().isMapToDefault( nullValueMappingStrategy ); } MethodReference factoryMethod = ctx.getMappingResolver().getFactoryMethod( method, method.getResultType(), null, null ); return new IterableMappingMethod( method, assignment, factoryMethod, mapNullToDefault, loopVariableName ); }

Target:
public IterableMappingMethod build() { Type sourceParameterType = first( method.getSourceParameters() ).getType(); Type resultType = method.getResultType(); Type sourceElementType = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType() : first( sourceParameterType.getTypeParameters() ).getTypeBound(); Type targetElementType = resultType.isArrayType() ? resultType.getComponentType() : first( resultType.getTypeParameters() ).getTypeBound(); String loopVariableName = Strings.getSaveVariableName( sourceElementType.getName(), method.getParameterNames() ); Assignment assignment = ctx.getMappingResolver().getTargetAssignment( method, "collection element", sourceElementType, targetElementType, null, dateFormat, qualifiers, qualifyingElementTargetType, loopVariableName, false ); if ( assignment == null ) { ctx.getMessager().printMessage( method.getExecutable(), Message.ITERABLEMAPPING_MAPPING_NOT_FOUND ); } else { if ( method instanceof ForgedMethod ) { ForgedMethod forgedMethod = (ForgedMethod) method; forgedMethod.addThrownTypes( assignment.getThrownTypes() ); } } if ( resultType.isArrayType() ) { assignment = new LocalVarWrapper( assignment, method.getThrownTypes() ); } else { assignment = new SetterWrapper( assignment, method.getThrownTypes() ); } boolean mapNullToDefault = false; if ( method.getMapperConfiguration() != null ) { mapNullToDefault = method.getMapperConfiguration().isMapToDefault( nullValueMappingStrategy ); } MethodReference factoryMethod = ctx.getMappingResolver().getFactoryMethod( method, method.getResultType(), null, null ); return new IterableMappingMethod( method, assignment, factoryMethod, mapNullToDefault, loopVariableName ); }