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.GeneratedTypeMethod
-
- org.mapstruct.ap.internal.model.MappingMethod
-
- org.mapstruct.ap.internal.model.ValueMappingMethod
-
- All Implemented Interfaces:
Writable
public class ValueMappingMethod extends MappingMethod
AValueMappingMethod
which maps one value type to another, optionally configured by one or moreValueMappingOptions
s. For now, only enum-to-enum mapping is supported.- Author:
- Sjaak Derksen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValueMappingMethod.Builder
static class
ValueMappingMethod.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 List<Annotation>
getAnnotations()
ValueMappingMethod.MappingEntry
getDefaultTarget()
Set<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.ValueMappingMethod.MappingEntry
getNullTarget()
Parameter
getSourceParameter()
Type
getUnexpectedValueMappingException()
List<ValueMappingMethod.MappingEntry>
getValueMappings()
protected boolean
hasMappingWithTargetAsException()
boolean
isOverridden()
-
Methods inherited from class org.mapstruct.ap.internal.model.MappingMethod
equals, filterMappingTarget, 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:ModelElement
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.- Overrides:
getImportTypes
in 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()
-
getAnnotations
public List<Annotation> getAnnotations()
-
-