Package org.mapstruct.ap.internal.model
Class SupportingConstructorFragment
java.lang.Object
org.mapstruct.ap.internal.writer.FreeMarkerWritable
org.mapstruct.ap.internal.model.common.ModelElement
org.mapstruct.ap.internal.model.SupportingConstructorFragment
- All Implemented Interfaces:
Writable
A mapper instance field, initialized as null
- Author:
- Sjaak Derksen
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context -
Constructor Summary
ConstructorsConstructorDescriptionSupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, String variableName) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAllFragmentsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<SupportingConstructorFragment> targets) booleanReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.getSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField) Returns the name of the template to be used for a specific writable type.inthashCode()Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateNameForClass, write
-
Constructor Details
-
SupportingConstructorFragment
public SupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, String variableName)
-
-
Method Details
-
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.
-
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.
-
getDefiningMethod
-
getVariableName
-
hashCode
public int hashCode() -
equals
-
addAllFragmentsIn
public static void addAllFragmentsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<SupportingConstructorFragment> targets) -
getSafeConstructorFragment
public static SupportingConstructorFragment getSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField)
-