Package org.mapstruct.ap.internal.model
Class BeanMappingMethod
- 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.NormalTypeMappingMethod
-
- org.mapstruct.ap.internal.model.BeanMappingMethod
-
- All Implemented Interfaces:
Writable
public class BeanMappingMethod extends NormalTypeMappingMethod
AMappingMethod
implemented by aMapper
class which maps one bean type to another, optionally configured by one or morePropertyMapping
s.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BeanMappingMethod.Builder
-
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<PropertyMapping>
constructorPropertyMappingsByParameter(Parameter parameter)
boolean
equals(Object obj)
List<PropertyMapping>
getConstantMappings()
List<PropertyMapping>
getConstructorConstantMappings()
MethodReference
getFinalizerMethod()
Set<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.Type
getReturnTypeToConstruct()
List<Parameter>
getSourceParametersExcludingPrimitives()
List<Parameter>
getSourceParametersNeedingNullCheck()
List<Parameter>
getSourceParametersNotNeedingNullCheck()
List<SubclassMapping>
getSubclassMappings()
boolean
hasConstructorMappings()
int
hashCode()
boolean
hasSubclassMappings()
boolean
isAbstractReturnType()
List<PropertyMapping>
propertyMappingsByParameter(Parameter parameter)
-
Methods inherited from class org.mapstruct.ap.internal.model.NormalTypeMappingMethod
getFactoryMethod, isMapNullToDefault, isOverridden
-
Methods inherited from class org.mapstruct.ap.internal.model.MappingMethod
getAccessibility, getAfterMappingReferences, getBeforeMappingReferencesWithMappingTarget, getBeforeMappingReferencesWithoutMappingTarget, getName, getParameterNames, getParameters, getResultName, getResultType, getReturnType, getSourceParameters, getThrownTypes, isExistingInstanceMapping, isStatic, toString
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Method Detail
-
getConstantMappings
public List<PropertyMapping> getConstantMappings()
-
getConstructorConstantMappings
public List<PropertyMapping> getConstructorConstantMappings()
-
getSubclassMappings
public List<SubclassMapping> getSubclassMappings()
-
propertyMappingsByParameter
public List<PropertyMapping> propertyMappingsByParameter(Parameter parameter)
-
constructorPropertyMappingsByParameter
public List<PropertyMapping> constructorPropertyMappingsByParameter(Parameter parameter)
-
getReturnTypeToConstruct
public Type getReturnTypeToConstruct()
-
hasSubclassMappings
public boolean hasSubclassMappings()
-
isAbstractReturnType
public boolean isAbstractReturnType()
-
hasConstructorMappings
public boolean hasConstructorMappings()
-
getFinalizerMethod
public MethodReference getFinalizerMethod()
-
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 classNormalTypeMappingMethod
- Returns:
- A set with type referenced by this model element. Must not be
null
.
-
getSourceParametersExcludingPrimitives
public List<Parameter> getSourceParametersExcludingPrimitives()
-
getSourceParametersNotNeedingNullCheck
public List<Parameter> getSourceParametersNotNeedingNullCheck()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classNormalTypeMappingMethod
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classNormalTypeMappingMethod
-
-