Package org.mapstruct.ap.internal.model
Class ValueMappingMethod
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.MappingMethod
-
- org.mapstruct.ap.internal.model.ValueMappingMethod
-
- All Implemented Interfaces:
Writable
public class ValueMappingMethod extends MappingMethod
AValueMappingMethodwhich maps one value type to another, optionally configured by one or moreValueMappingOptionss. For now, only enum-to-enum mapping is supported.- Author:
- Sjaak Derksen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValueMappingMethod.Builderstatic classValueMappingMethod.MappingEntry-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueMappingMethod.MappingEntrygetDefaultTarget()Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.ValueMappingMethod.MappingEntrygetNullTarget()ParametergetSourceParameter()TypegetUnexpectedValueMappingException()List<ValueMappingMethod.MappingEntry>getValueMappings()protected booleanhasMappingWithTargetAsException()booleanisOverridden()-
Methods inherited from class org.mapstruct.ap.internal.model.MappingMethod
equals, getAccessibility, getAfterMappingReferences, getBeforeMappingReferencesWithMappingTarget, getBeforeMappingReferencesWithoutMappingTarget, getName, getParameterNames, getParameters, getResultName, getResultType, getReturnType, getSourceParameters, getThrownTypes, hashCode, isExistingInstanceMapping, isStatic, toString
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Method Detail
-
getImportTypes
public Set<Type> getImportTypes()
Description copied from class:ModelElementReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.- Overrides:
getImportTypesin classMappingMethod- Returns:
- A set with type referenced by this model element. Must not be
null.
-
hasMappingWithTargetAsException
protected boolean hasMappingWithTargetAsException()
-
getValueMappings
public List<ValueMappingMethod.MappingEntry> getValueMappings()
-
getDefaultTarget
public ValueMappingMethod.MappingEntry getDefaultTarget()
-
getNullTarget
public ValueMappingMethod.MappingEntry getNullTarget()
-
getUnexpectedValueMappingException
public Type getUnexpectedValueMappingException()
-
getSourceParameter
public Parameter getSourceParameter()
-
isOverridden
public boolean isOverridden()
-
-