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
|
||||
* {@link MapperConfig#nullValueMappingStrategy()} to be applied, if present.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* Otherwise causes {@link #RETURN_NULL} to be applied.
|
||||
*/
|
||||
|
@ -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<Type> {
|
||||
* getPropertyWriteAccessors returns a map of the write accessors according to the CollectionMappingStrategy.
|
||||
*
|
||||
* These accessors include:
|
||||
* <p>
|
||||
*
|
||||
* <ul>
|
||||
* <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
|
||||
* {@link #getPropertyReadAccessors() }</li>
|
||||
* <li>adders, typically for from table generated entities, {@link #getAdders() }</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @param cmStrategy
|
||||
* @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.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(
|
||||
|
@ -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.
|
||||
* <p>
|
||||
* 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
|
||||
*/
|
||||
|
@ -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<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).
|
||||
*
|
||||
* <p>
|
||||
* Prefers (when present):
|
||||
* <ol>
|
||||
* <li>create method candidates (methods not containing {@link @MappingTarget} ) when mapping method is
|
||||
* a create method</li>
|
||||
* <li>update method candidates (methods containing {@link @MappingTarget} ) when mapping method is
|
||||
* an update method</li>
|
||||
* <li>create method candidates (methods not containing {@code @MappingTarget}) when mapping method is a create
|
||||
* method</li>
|
||||
* <li>update method candidates (methods containing {@code @MappingTarget} ) when mapping method is an update method
|
||||
* </li>
|
||||
* </ol>
|
||||
* When not present, the remaining (createCandidates when mapping method is update method, updateCandidates when mapping
|
||||
* method is a create method) candidates are selected.
|
||||
* </p>
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class CreateOrUpdateSelector implements MethodSelector {
|
||||
|
@ -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.
|
||||
* <p>
|
||||
* 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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user