Source:
public IterableMappingMethod build() { Type sourceParameterType = method.getSourceParameters().iterator().next().getType(); Type resultType = method.getResultType(); Type sourceElementType = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType() : sourceParameterType.getTypeParameters().get( 0 ); Type targetElementType = resultType.isArrayType() ? resultType.getComponentType() : resultType.getTypeParameters().get( 0 ); String elementTypeName = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType().getName() : sourceParameterType.getTypeParameters().get( 0 ).getName(); String loopVariableName = Strings.getSaveVariableName( elementTypeName, method.getParameterNames() ); Assignment assignment = ctx.getMappingResolver().getTargetAssignment( method, "collection element", sourceElementType, targetElementType, null, dateFormat, qualifiers, qualifyingElementTargetType, loopVariableName ); if ( assignment == null ) { ctx.getMessager().printMessage( method.getExecutable(), Message.ITERABLEMAPPING_MAPPING_NOT_FOUND, method ); } if ( resultType.isArrayType() ) { assignment = new LocalVarWrapper( assignment, method.getThrownTypes() ); } else { assignment = new SetterWrapper( assignment, method.getThrownTypes() ); } NullValueMappingPrism prism = NullValueMappingPrism.getInstanceOn( method.getExecutable() ); boolean mapNullToDefault = MapperConfig.getInstanceOn( ctx.getMapperTypeElement() ).isMapToDefault( prism ); MethodReference factoryMethod = ctx.getMappingResolver().getFactoryMethod( method, method.getResultType() ); return new IterableMappingMethod( method, assignment, factoryMethod, mapNullToDefault, loopVariableName ); }

Target:
public IterableMappingMethod build() { Type sourceParameterType = method.getSourceParameters().iterator().next().getType(); Type resultType = method.getResultType(); Type sourceElementType = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType() : sourceParameterType.getTypeParameters().get( 0 ); Type targetElementType = resultType.isArrayType() ? resultType.getComponentType() : resultType.getTypeParameters().get( 0 ); String elementTypeName = sourceParameterType.isArrayType() ? sourceParameterType.getComponentType().getName() : sourceParameterType.getTypeParameters().get( 0 ).getName(); String loopVariableName = Strings.getSaveVariableName( elementTypeName, method.getParameterNames() ); Assignment assignment = ctx.getMappingResolver().getTargetAssignment( method, "collection element", sourceElementType, targetElementType, null, dateFormat, qualifiers, qualifyingElementTargetType, loopVariableName ); 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() ); } NullValueMappingPrism prism = NullValueMappingPrism.getInstanceOn( method.getExecutable() ); boolean mapNullToDefault = MapperConfig.getInstanceOn( ctx.getMapperTypeElement() ).isMapToDefault( prism ); MethodReference factoryMethod = ctx.getMappingResolver().getFactoryMethod( method, method.getResultType() ); return new IterableMappingMethod( method, assignment, factoryMethod, mapNullToDefault, loopVariableName ); }