diff --git a/processor/src/main/java/org/mapstruct/ap/model/IterableMappingMethod.java b/processor/src/main/java/org/mapstruct/ap/model/IterableMappingMethod.java index 521435d22..b263553f8 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/IterableMappingMethod.java +++ b/processor/src/main/java/org/mapstruct/ap/model/IterableMappingMethod.java @@ -34,10 +34,10 @@ import org.mapstruct.ap.util.Strings; */ public class IterableMappingMethod extends MappingMethod { - private final MappingMethodReference elementMappingMethod; + private final MethodReference elementMappingMethod; private final TypeConversion conversion; - public IterableMappingMethod(Method method, MappingMethodReference elementMappingMethod, + public IterableMappingMethod(Method method, MethodReference elementMappingMethod, TypeConversion conversion) { super( method ); this.elementMappingMethod = elementMappingMethod; @@ -54,7 +54,7 @@ public class IterableMappingMethod extends MappingMethod { throw new IllegalStateException( "Method " + this + " has no source parameter." ); } - public MappingMethodReference getElementMappingMethod() { + public MethodReference getElementMappingMethod() { return elementMappingMethod; } diff --git a/processor/src/main/java/org/mapstruct/ap/model/MapMappingMethod.java b/processor/src/main/java/org/mapstruct/ap/model/MapMappingMethod.java index 66a1e409b..fe7260d54 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/MapMappingMethod.java +++ b/processor/src/main/java/org/mapstruct/ap/model/MapMappingMethod.java @@ -33,13 +33,13 @@ import org.mapstruct.ap.util.Strings; */ public class MapMappingMethod extends MappingMethod { - private final MappingMethodReference keyMappingMethod; - private final MappingMethodReference valueMappingMethod; + private final MethodReference keyMappingMethod; + private final MethodReference valueMappingMethod; private final TypeConversion keyConversion; private final TypeConversion valueConversion; - public MapMappingMethod(Method method, MappingMethodReference keyMappingMethod, TypeConversion keyConversion, - MappingMethodReference valueMappingMethod, TypeConversion valueConversion) { + public MapMappingMethod(Method method, MethodReference keyMappingMethod, TypeConversion keyConversion, + MethodReference valueMappingMethod, TypeConversion valueConversion) { super( method ); this.keyMappingMethod = keyMappingMethod; @@ -58,7 +58,7 @@ public class MapMappingMethod extends MappingMethod { throw new IllegalStateException( "Method " + this + " has no source parameter." ); } - public MappingMethodReference getKeyMappingMethod() { + public MethodReference getKeyMappingMethod() { return keyMappingMethod; } @@ -66,7 +66,7 @@ public class MapMappingMethod extends MappingMethod { return keyConversion; } - public MappingMethodReference getValueMappingMethod() { + public MethodReference getValueMappingMethod() { return valueMappingMethod; } diff --git a/processor/src/main/java/org/mapstruct/ap/model/MappingMethodReference.java b/processor/src/main/java/org/mapstruct/ap/model/MethodReference.java similarity index 91% rename from processor/src/main/java/org/mapstruct/ap/model/MappingMethodReference.java rename to processor/src/main/java/org/mapstruct/ap/model/MethodReference.java index 1845ab33b..c45e9e869 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/MappingMethodReference.java +++ b/processor/src/main/java/org/mapstruct/ap/model/MethodReference.java @@ -29,11 +29,11 @@ import org.mapstruct.ap.model.source.Method; * * @author Gunnar Morling */ -public class MappingMethodReference extends MappingMethod { +public class MethodReference extends MappingMethod { private final MapperReference declaringMapper; - public MappingMethodReference(Method method, MapperReference declaringMapper) { + public MethodReference(Method method, MapperReference declaringMapper) { super( method ); this.declaringMapper = declaringMapper; } diff --git a/processor/src/main/java/org/mapstruct/ap/model/PropertyMapping.java b/processor/src/main/java/org/mapstruct/ap/model/PropertyMapping.java index 5659fcc21..b19dd69f9 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/PropertyMapping.java +++ b/processor/src/main/java/org/mapstruct/ap/model/PropertyMapping.java @@ -44,12 +44,12 @@ public class PropertyMapping extends ModelElement { private final Type targetType; private final boolean isTargetAccessorSetter; - private final MappingMethodReference mappingMethod; + private final MethodReference mappingMethod; private final TypeConversion conversion; public PropertyMapping(String sourceBeanName, String sourceName, String sourceAccessorName, Type sourceType, String targetName, String targetAccessorName, Type targetType, - MappingMethodReference mappingMethod, TypeConversion conversion) { + MethodReference mappingMethod, TypeConversion conversion) { this.sourceBeanName = sourceBeanName; this.sourceName = sourceName; @@ -93,7 +93,7 @@ public class PropertyMapping extends ModelElement { return targetType; } - public MappingMethodReference getMappingMethod() { + public MethodReference getMappingMethod() { return mappingMethod; } diff --git a/processor/src/main/java/org/mapstruct/ap/processor/MapperCreationProcessor.java b/processor/src/main/java/org/mapstruct/ap/processor/MapperCreationProcessor.java index 0717296a5..b42b6f348 100644 --- a/processor/src/main/java/org/mapstruct/ap/processor/MapperCreationProcessor.java +++ b/processor/src/main/java/org/mapstruct/ap/processor/MapperCreationProcessor.java @@ -51,7 +51,7 @@ import org.mapstruct.ap.model.MapMappingMethod; import org.mapstruct.ap.model.Mapper; import org.mapstruct.ap.model.MapperReference; import org.mapstruct.ap.model.MappingMethod; -import org.mapstruct.ap.model.MappingMethodReference; +import org.mapstruct.ap.model.MethodReference; import org.mapstruct.ap.model.PropertyMapping; import org.mapstruct.ap.model.TypeConversion; import org.mapstruct.ap.model.common.Parameter; @@ -545,7 +545,7 @@ public class MapperCreationProcessor implements ModelElementProcessor mapperReferences, + private MethodReference getMappingMethodReference(List mapperReferences, Iterable methods, Type parameterType, Type returnType) { List candidatesWithMathingTargetType = new ArrayList(); @@ -751,7 +751,7 @@ public class MapperCreationProcessor implements ModelElementProcessor candidatesWithBestMathingType, int bestMatchingTypeDistance, diff --git a/processor/src/main/resources/org.mapstruct.ap.model.MappingMethodReference.ftl b/processor/src/main/resources/org.mapstruct.ap.model.MethodReference.ftl similarity index 100% rename from processor/src/main/resources/org.mapstruct.ap.model.MappingMethodReference.ftl rename to processor/src/main/resources/org.mapstruct.ap.model.MethodReference.ftl