From eddc951c010c77072d34e4dd321fa438ad03cfc1 Mon Sep 17 00:00:00 2001 From: Gunnar Morling Date: Thu, 5 Mar 2015 00:04:03 +0100 Subject: [PATCH] Fixing several JavaDoc issues --- .../java/org/mapstruct/NullValueMappingStrategy.java | 4 ++-- .../main/java/org/mapstruct/ap/model/common/Type.java | 7 ++++--- .../java/org/mapstruct/ap/model/source/Mapping.java | 3 +-- .../org/mapstruct/ap/model/source/SourceMethod.java | 5 ++--- .../mapstruct/ap/model/source/SourceReference.java | 2 -- .../model/source/selector/CreateOrUpdateSelector.java | 11 +++++------ .../ap/model/source/selector/TargetTypeSelector.java | 5 +++-- 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java b/core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java index 6fbd1e83e..f2edf2cdd 100644 --- a/core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java +++ b/core-common/src/main/java/org/mapstruct/NullValueMappingStrategy.java @@ -49,8 +49,8 @@ public enum NullValueMappingStrategy { * When given via {@link Mapper#nullValueMappingStrategy()}, causes the setting specified via * {@link MapperConfig#nullValueMappingStrategy()} to be applied, if present. *

- * When given via {@link NullValueMapping#value()}, causes the setting specified via - * {@link Mapper#nullValueMappingStrategy() ()} to be applied, if present. + * When given on specific mapping methods (e.g. via @ BeanMapping#nullValueMappingStrategy()}), causes the setting + * specified via {@link Mapper#nullValueMappingStrategy() ()} to be applied, if present. *

* Otherwise causes {@link #RETURN_NULL} to be applied. */ diff --git a/processor/src/main/java/org/mapstruct/ap/model/common/Type.java b/processor/src/main/java/org/mapstruct/ap/model/common/Type.java index 5bb9da615..98602ef46 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/common/Type.java +++ b/processor/src/main/java/org/mapstruct/ap/model/common/Type.java @@ -26,6 +26,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; + import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; @@ -38,8 +39,8 @@ import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; -import org.mapstruct.ap.prism.CollectionMappingStrategyPrism; +import org.mapstruct.ap.prism.CollectionMappingStrategyPrism; import org.mapstruct.ap.util.Executables; import org.mapstruct.ap.util.Filters; import org.mapstruct.ap.util.Nouns; @@ -334,14 +335,14 @@ public class Type extends ModelElement implements Comparable { * getPropertyWriteAccessors returns a map of the write accessors according to the CollectionMappingStrategy. * * These accessors include: - *

+ * *

- *

+ * * @param cmStrategy * @return an unmodifiable map of all write accessors indexed by property name */ diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java b/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java index 7d81827b2..694a7d66d 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; + import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationValue; import javax.lang.model.element.ElementKind; @@ -321,8 +322,6 @@ public class Mapping { /** * Creates a copy of this mapping, which is adapted to the given method - * - * @param the method to adapt the copy to */ public Mapping copyForInheritanceTo(SourceMethod method) { Mapping mapping = new Mapping( diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/SourceMethod.java b/processor/src/main/java/org/mapstruct/ap/model/source/SourceMethod.java index 1a8e3392c..09284ae2d 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/SourceMethod.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/SourceMethod.java @@ -44,9 +44,8 @@ import static org.mapstruct.ap.util.Collections.first; * Represents a mapping method with source and target type and the mappings between the properties of source and target * type. *

- * A method can either be configured by itself or by another method for the inverse mapping direction (one of - * {@link #setMappings(Map)}, {@link #setIterableMapping(IterableMapping)} or {@link #setMapMapping(MapMapping)} will be - * called in this case). + * A method can either be configured by itself or by another method for the inverse mapping direction (the appropriate + * setter on {@link MappingOptions} will be called in this case). * * @author Gunnar Morling */ diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/SourceReference.java b/processor/src/main/java/org/mapstruct/ap/model/source/SourceReference.java index 2b1e91845..db163524b 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/SourceReference.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/SourceReference.java @@ -292,8 +292,6 @@ public class SourceReference { /** * Creates a copy of this reference, which is adapted to the given method - * - * @param the method to adapt the copy to */ public SourceReference copyForInheritanceTo(SourceMethod method) { List replacementParamCandidates = new ArrayList(); diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/selector/CreateOrUpdateSelector.java b/processor/src/main/java/org/mapstruct/ap/model/source/selector/CreateOrUpdateSelector.java index fe7287922..7d394be84 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/selector/CreateOrUpdateSelector.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/selector/CreateOrUpdateSelector.java @@ -26,18 +26,17 @@ import org.mapstruct.ap.model.source.Method; /** * Selection based on type of method (create - or update method). - * *

* Prefers (when present): *

    - *
  1. create method candidates (methods not containing {@link @MappingTarget} ) when mapping method is - * a create method
  2. - *
  3. update method candidates (methods containing {@link @MappingTarget} ) when mapping method is - * an update method
  4. + *
  5. create method candidates (methods not containing {@code @MappingTarget}) when mapping method is a create + * method
  6. + *
  7. update method candidates (methods containing {@code @MappingTarget} ) when mapping method is an update method + *
  8. *
* When not present, the remaining (createCandidates when mapping method is update method, updateCandidates when mapping * method is a create method) candidates are selected. - *

+ * * @author Sjaak Derksen */ public class CreateOrUpdateSelector implements MethodSelector { diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/selector/TargetTypeSelector.java b/processor/src/main/java/org/mapstruct/ap/model/source/selector/TargetTypeSelector.java index dd6d056c6..2b52abf1a 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/selector/TargetTypeSelector.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/selector/TargetTypeSelector.java @@ -20,6 +20,7 @@ package org.mapstruct.ap.model.source.selector; import java.util.ArrayList; import java.util.List; + import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; @@ -30,8 +31,8 @@ import org.mapstruct.ap.model.source.Method; /** * This selector selects a best match based on the result type. *

- * Suppose: Sedan -> Car -> Vehicle, MotorCycle -> Vehicle - * By means of this selector one can pinpoint the exact desired return type (Sedan, Car, MotorCycle, Vehicle) + * Suppose: Sedan -> Car -> Vehicle, MotorCycle -> Vehicle By means of this selector one can pinpoint the exact + * desired return type (Sedan, Car, MotorCycle, Vehicle) * * @author Sjaak Derksen */