Package org.mapstruct.ap.internal.model
Class SupportingField
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.Field
-
- org.mapstruct.ap.internal.model.SupportingField
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Constructor Summary
Constructors Constructor Description SupportingField(SupportingMappingMethod definingMethod, FieldReference fieldReference, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addAllFieldsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<Field> targets)
SupportingMappingMethod
getDefiningMethod()
static Field
getSafeField(SupportingMappingMethod method, FieldReference ref, Set<Field> existingFields)
String
getTemplateName()
Returns the name of the template to be used for a specific writable type.Map<String,Object>
getTemplateParameter()
-
Methods inherited from class org.mapstruct.ap.internal.model.Field
equals, getFieldNames, getImportTypes, getType, getVariableName, hashCode, isTypeRequiresImport, isUsed, setTypeRequiresImport, setUsed
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateNameForClass, write
-
-
-
-
Constructor Detail
-
SupportingField
public SupportingField(SupportingMappingMethod definingMethod, FieldReference fieldReference, String name)
-
-
Method Detail
-
getTemplateName
public String getTemplateName()
Description copied from class:FreeMarkerWritable
Returns the name of the template to be used for a specific writable type. By default,FreeMarkerWritable.getTemplateNameForClass(Class)
is called withgetClass()
, but this can be customized by overriding this method if required.- Overrides:
getTemplateName
in classFreeMarkerWritable
- Returns:
- the name of the template. Must not be
null
.
-
getDefiningMethod
public SupportingMappingMethod getDefiningMethod()
-
addAllFieldsIn
public static void addAllFieldsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<Field> targets)
-
getSafeField
public static Field getSafeField(SupportingMappingMethod method, FieldReference ref, Set<Field> existingFields)
-
-