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
-
-
Field Summary
Fields Modifier and Type Field Description private SupportingMappingMethoddefiningMethodprivate java.lang.StringtemplateNameprivate java.util.Map<java.lang.String,java.lang.Object>templateParameter
-
Constructor Summary
Constructors Constructor Description SupportingField(SupportingMappingMethod definingMethod, FieldReference fieldReference, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAllFieldsIn(java.util.Set<SupportingMappingMethod> supportingMappingMethods, java.util.Set<Field> targets)SupportingMappingMethodgetDefiningMethod()static FieldgetSafeField(SupportingMappingMethod method, FieldReference ref, java.util.Set<Field> existingFields)java.lang.StringgetTemplateName()Returns the name of the template to be used for a specific writable type.java.util.Map<java.lang.String,java.lang.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
-
-
-
-
Field Detail
-
templateName
private final java.lang.String templateName
-
templateParameter
private final java.util.Map<java.lang.String,java.lang.Object> templateParameter
-
definingMethod
private final SupportingMappingMethod definingMethod
-
-
Constructor Detail
-
SupportingField
public SupportingField(SupportingMappingMethod definingMethod, FieldReference fieldReference, java.lang.String name)
-
-
Method Detail
-
getTemplateName
public java.lang.String getTemplateName()
Description copied from class:FreeMarkerWritableReturns 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:
getTemplateNamein classFreeMarkerWritable- Returns:
- the name of the template. Must not be
null.
-
getTemplateParameter
public java.util.Map<java.lang.String,java.lang.Object> getTemplateParameter()
-
getDefiningMethod
public SupportingMappingMethod getDefiningMethod()
-
addAllFieldsIn
public static void addAllFieldsIn(java.util.Set<SupportingMappingMethod> supportingMappingMethods, java.util.Set<Field> targets)
-
getSafeField
public static Field getSafeField(SupportingMappingMethod method, FieldReference ref, java.util.Set<Field> existingFields)
-
-