Package org.mapstruct.ap.internal.model
Class PropertyMapping
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.PropertyMapping
-
- All Implemented Interfaces:
Writable
public class PropertyMapping extends ModelElement
Represents the mapping between a source and target property, e.g. fromString Source#footoint Target#bar. Name and type of source and target property can differ. If they have different types, the mapping must either refer to a mapping method or a conversion.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPropertyMapping.ConstantMappingBuilderstatic classPropertyMapping.JavaExpressionMappingBuilderstatic classPropertyMapping.PropertyMappingBuilder-
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 booleanequals(Object obj)AssignmentgetAssignment()AssignmentgetDefaultValueAssignment()Set<String>getDependsOn()Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.StringgetName()StringgetSourceBeanName()StringgetSourcePropertyName()StringgetTargetReadAccessorName()TypegetTargetType()StringgetTargetWriteAccessorName()inthashCode()booleanisConstructorMapping()StringtoString()-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of this mapping (property name on the target side)
-
getSourcePropertyName
public String getSourcePropertyName()
-
getSourceBeanName
public String getSourceBeanName()
-
getTargetWriteAccessorName
public String getTargetWriteAccessorName()
-
getTargetReadAccessorName
public String getTargetReadAccessorName()
-
getTargetType
public Type getTargetType()
-
getAssignment
public Assignment getAssignment()
-
getDefaultValueAssignment
public Assignment getDefaultValueAssignment()
-
isConstructorMapping
public boolean isConstructorMapping()
-
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.- Specified by:
getImportTypesin classModelElement- Returns:
- A set with type referenced by this model element. Must not be
null.
-
-