Class MappingOptions
java.lang.Object
org.mapstruct.ap.internal.model.source.DelegatingOptions
org.mapstruct.ap.internal.model.source.MappingOptions
Represents a property mapping as configured via
@Mapping (no intermediate state).- Author:
- Gunnar Morling
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddInstance(org.mapstruct.ap.internal.gem.MappingGem mapping, ExecutableElement method, BeanMappingOptions beanMappingOptions, FormattingMessager messager, TypeUtils typeUtils, Set<MappingOptions> mappings) static voidaddInstances(org.mapstruct.ap.internal.gem.MappingsGem gem, ExecutableElement method, BeanMappingOptions beanMappingOptions, FormattingMessager messager, TypeUtils typeUtils, Set<MappingOptions> mappings) booleanMapping can only be inversed if the source was not a constant nor an expressioncopyForForwardInheritance(SourceMethod templateMethod, BeanMappingOptions beanMappingOptions) Creates a copy of this mappingcopyForInverseInheritance(SourceMethod templateMethod, BeanMappingOptions beanMappingOptions) booleanstatic MappingOptionsgetMappingControl(ElementUtils elementUtils) getMappingTargetNamesBy(Predicate<MappingOptions> predicate, Set<MappingOptions> mappings) org.mapstruct.ap.internal.gem.NullValueCheckStrategyGemorg.mapstruct.ap.internal.gem.NullValuePropertyMappingStrategyGemReturns the complete source name of this mapping, either a qualified (e.g.booleaninthashCode()booleantoString()Methods inherited from class org.mapstruct.ap.internal.model.source.DelegatingOptions
componentModel, getBuilder, getCollectionMappingStrategy, getInjectionStrategy, getMappingInheritanceStrategy, getNullValueIterableMappingStrategy, getNullValueMapMappingStrategy, getNullValueMappingStrategy, getSubclassExhaustiveException, getSubclassExhaustiveStrategy, getUnexpectedValueMappingException, implementationName, implementationPackage, imports, isDisableSubMappingMethodsGeneration, suppressTimestampInGenerated, toDeclaredTypes, typeConversionPolicy, unmappedSourcePolicy, unmappedTargetPolicy, uses
-
Method Details
-
getMappingTargetNamesBy
public static Set<String> getMappingTargetNamesBy(Predicate<MappingOptions> predicate, Set<MappingOptions> mappings) -
addInstances
public static void addInstances(org.mapstruct.ap.internal.gem.MappingsGem gem, ExecutableElement method, BeanMappingOptions beanMappingOptions, FormattingMessager messager, TypeUtils typeUtils, Set<MappingOptions> mappings) -
addInstance
public static void addInstance(org.mapstruct.ap.internal.gem.MappingGem mapping, ExecutableElement method, BeanMappingOptions beanMappingOptions, FormattingMessager messager, TypeUtils typeUtils, Set<MappingOptions> mappings) -
forIgnore
-
getTargetName
-
getTargetAnnotationValue
-
getSourceName
Returns the complete source name of this mapping, either a qualified (e.g.parameter1.foo) or unqualified (e.g.foo) property reference.- Returns:
- The complete source name of this mapping.
-
getSourceAnnotationValue
-
getConstant
-
getJavaExpression
-
getDefaultJavaExpression
-
getConditionJavaExpression
-
getDefaultValue
-
getFormattingParameters
-
getSelectionParameters
-
isIgnored
public boolean isIgnored() -
getMirror
-
getElement
-
getDependsOnAnnotationValue
-
getDependsOn
-
getInheritContext
-
getNullValueCheckStrategy
public org.mapstruct.ap.internal.gem.NullValueCheckStrategyGem getNullValueCheckStrategy()- Overrides:
getNullValueCheckStrategyin classDelegatingOptions
-
getNullValuePropertyMappingStrategy
public org.mapstruct.ap.internal.gem.NullValuePropertyMappingStrategyGem getNullValuePropertyMappingStrategy()- Overrides:
getNullValuePropertyMappingStrategyin classDelegatingOptions
-
getMappingControl
- Overrides:
getMappingControlin classDelegatingOptions
-
canInverse
public boolean canInverse()Mapping can only be inversed if the source was not a constant nor an expression- Returns:
- true when the above applies
-
copyForInverseInheritance
public MappingOptions copyForInverseInheritance(SourceMethod templateMethod, BeanMappingOptions beanMappingOptions) -
copyForForwardInheritance
public MappingOptions copyForForwardInheritance(SourceMethod templateMethod, BeanMappingOptions beanMappingOptions) Creates a copy of this mapping- Parameters:
templateMethod- the template method for the inheritancebeanMappingOptions- the bean mapping options- Returns:
- the copy
-
equals
-
hashCode
public int hashCode() -
toString
-
hasAnnotation
public boolean hasAnnotation()- Specified by:
hasAnnotationin classDelegatingOptions
-