Package org.mapstruct.ap.internal.model
Class SubclassMapping
java.lang.Object
org.mapstruct.ap.internal.writer.FreeMarkerWritable
org.mapstruct.ap.internal.model.common.ModelElement
org.mapstruct.ap.internal.model.SubclassMapping
- All Implemented Interfaces:
Writable
Represents the mapping between a Subclass and its mapping target. This will be used by a
BeanMappingMethod
that has SubclassMapping annotations applied to it. Before doing the normal mapping for that
method it will first check if the source object is of the sourceType if so it will use the assignment instead.- Author:
- Ben Zegveld
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context -
Constructor Summary
ConstructorsConstructorDescriptionSubclassMapping(Type sourceType, String sourceArgument, Type targetType, Assignment assignment) -
Method Summary
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
Constructor Details
-
SubclassMapping
public SubclassMapping(Type sourceType, String sourceArgument, Type targetType, Assignment assignment)
-
-
Method Details
-
getSourceType
-
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.
-
getAssignment
-
getSourceArgument
-
equals
-
hashCode
public int hashCode()
-