mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Fixing several JavaDoc issues
This commit is contained in:
parent
c52db7d1a2
commit
eddc951c01
@ -49,8 +49,8 @@ public enum NullValueMappingStrategy {
|
|||||||
* When given via {@link Mapper#nullValueMappingStrategy()}, causes the setting specified via
|
* When given via {@link Mapper#nullValueMappingStrategy()}, causes the setting specified via
|
||||||
* {@link MapperConfig#nullValueMappingStrategy()} to be applied, if present.
|
* {@link MapperConfig#nullValueMappingStrategy()} to be applied, if present.
|
||||||
* <p>
|
* <p>
|
||||||
* When given via {@link NullValueMapping#value()}, causes the setting specified via
|
* When given on specific mapping methods (e.g. via @ BeanMapping#nullValueMappingStrategy()}), causes the setting
|
||||||
* {@link Mapper#nullValueMappingStrategy() ()} to be applied, if present.
|
* specified via {@link Mapper#nullValueMappingStrategy() ()} to be applied, if present.
|
||||||
* <p>
|
* <p>
|
||||||
* Otherwise causes {@link #RETURN_NULL} to be applied.
|
* Otherwise causes {@link #RETURN_NULL} to be applied.
|
||||||
*/
|
*/
|
||||||
|
@ -26,6 +26,7 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.lang.model.element.AnnotationMirror;
|
import javax.lang.model.element.AnnotationMirror;
|
||||||
import javax.lang.model.element.Element;
|
import javax.lang.model.element.Element;
|
||||||
import javax.lang.model.element.ElementKind;
|
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.type.TypeMirror;
|
||||||
import javax.lang.model.util.Elements;
|
import javax.lang.model.util.Elements;
|
||||||
import javax.lang.model.util.Types;
|
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.Executables;
|
||||||
import org.mapstruct.ap.util.Filters;
|
import org.mapstruct.ap.util.Filters;
|
||||||
import org.mapstruct.ap.util.Nouns;
|
import org.mapstruct.ap.util.Nouns;
|
||||||
@ -334,14 +335,14 @@ public class Type extends ModelElement implements Comparable<Type> {
|
|||||||
* getPropertyWriteAccessors returns a map of the write accessors according to the CollectionMappingStrategy.
|
* getPropertyWriteAccessors returns a map of the write accessors according to the CollectionMappingStrategy.
|
||||||
*
|
*
|
||||||
* These accessors include:
|
* These accessors include:
|
||||||
* <p>
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>setters, the obvious candidate :-), {@link #getSetters() }</li>
|
* <li>setters, the obvious candidate :-), {@link #getSetters() }</li>
|
||||||
* <li>getters, for collections that do not have a setter, e.g. for JAXB generated collection attributes
|
* <li>getters, for collections that do not have a setter, e.g. for JAXB generated collection attributes
|
||||||
* {@link #getPropertyReadAccessors() }</li>
|
* {@link #getPropertyReadAccessors() }</li>
|
||||||
* <li>adders, typically for from table generated entities, {@link #getAdders() }</li>
|
* <li>adders, typically for from table generated entities, {@link #getAdders() }</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
*
|
||||||
* @param cmStrategy
|
* @param cmStrategy
|
||||||
* @return an unmodifiable map of all write accessors indexed by property name
|
* @return an unmodifiable map of all write accessors indexed by property name
|
||||||
*/
|
*/
|
||||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.lang.model.element.AnnotationMirror;
|
import javax.lang.model.element.AnnotationMirror;
|
||||||
import javax.lang.model.element.AnnotationValue;
|
import javax.lang.model.element.AnnotationValue;
|
||||||
import javax.lang.model.element.ElementKind;
|
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
|
* 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) {
|
public Mapping copyForInheritanceTo(SourceMethod method) {
|
||||||
Mapping mapping = new Mapping(
|
Mapping mapping = new Mapping(
|
||||||
|
@ -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
|
* Represents a mapping method with source and target type and the mappings between the properties of source and target
|
||||||
* type.
|
* type.
|
||||||
* <p>
|
* <p>
|
||||||
* A method can either be configured by itself or by another method for the inverse mapping direction (one of
|
* A method can either be configured by itself or by another method for the inverse mapping direction (the appropriate
|
||||||
* {@link #setMappings(Map)}, {@link #setIterableMapping(IterableMapping)} or {@link #setMapMapping(MapMapping)} will be
|
* setter on {@link MappingOptions} will be called in this case).
|
||||||
* called in this case).
|
|
||||||
*
|
*
|
||||||
* @author Gunnar Morling
|
* @author Gunnar Morling
|
||||||
*/
|
*/
|
||||||
|
@ -292,8 +292,6 @@ public class SourceReference {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a copy of this reference, which is adapted to the given method
|
* 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) {
|
public SourceReference copyForInheritanceTo(SourceMethod method) {
|
||||||
List<Parameter> replacementParamCandidates = new ArrayList<Parameter>();
|
List<Parameter> replacementParamCandidates = new ArrayList<Parameter>();
|
||||||
|
@ -26,18 +26,17 @@ import org.mapstruct.ap.model.source.Method;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection based on type of method (create - or update method).
|
* Selection based on type of method (create - or update method).
|
||||||
*
|
|
||||||
* <p>
|
* <p>
|
||||||
* Prefers (when present):
|
* Prefers (when present):
|
||||||
* <ol>
|
* <ol>
|
||||||
* <li>create method candidates (methods not containing {@link @MappingTarget} ) when mapping method is
|
* <li>create method candidates (methods not containing {@code @MappingTarget}) when mapping method is a create
|
||||||
* a create method</li>
|
* method</li>
|
||||||
* <li>update method candidates (methods containing {@link @MappingTarget} ) when mapping method is
|
* <li>update method candidates (methods containing {@code @MappingTarget} ) when mapping method is an update method
|
||||||
* an update method</li>
|
* </li>
|
||||||
* </ol>
|
* </ol>
|
||||||
* When not present, the remaining (createCandidates when mapping method is update method, updateCandidates when mapping
|
* When not present, the remaining (createCandidates when mapping method is update method, updateCandidates when mapping
|
||||||
* method is a create method) candidates are selected.
|
* method is a create method) candidates are selected.
|
||||||
* </p>
|
*
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class CreateOrUpdateSelector implements MethodSelector {
|
public class CreateOrUpdateSelector implements MethodSelector {
|
||||||
|
@ -20,6 +20,7 @@ package org.mapstruct.ap.model.source.selector;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.lang.model.type.TypeMirror;
|
import javax.lang.model.type.TypeMirror;
|
||||||
import javax.lang.model.util.Elements;
|
import javax.lang.model.util.Elements;
|
||||||
import javax.lang.model.util.Types;
|
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.
|
* This selector selects a best match based on the result type.
|
||||||
* <p>
|
* <p>
|
||||||
* Suppose: Sedan -> Car -> Vehicle, MotorCycle -> Vehicle
|
* Suppose: Sedan -> Car -> Vehicle, MotorCycle -> Vehicle By means of this selector one can pinpoint the exact
|
||||||
* By means of this selector one can pinpoint the exact desired return type (Sedan, Car, MotorCycle, Vehicle)
|
* desired return type (Sedan, Car, MotorCycle, Vehicle)
|
||||||
*
|
*
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user