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
public class SupportingConstructorFragment extends ModelElement
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
Constructors Constructor Description SupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, String variableName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAllFragmentsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<SupportingConstructorFragment> targets)booleanequals(Object obj)SupportingMappingMethodgetDefiningMethod()Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.static SupportingConstructorFragmentgetSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField)StringgetTemplateName()Returns the name of the template to be used for a specific writable type.StringgetVariableName()inthashCode()-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateNameForClass, write
-
-
-
-
Constructor Detail
-
SupportingConstructorFragment
public SupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, String variableName)
-
-
Method Detail
-
getTemplateName
public 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.
-
getImportTypes
public Set<Type> 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
public SupportingMappingMethod getDefiningMethod()
-
getVariableName
public String getVariableName()
-
addAllFragmentsIn
public static void addAllFragmentsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<SupportingConstructorFragment> targets)
-
getSafeConstructorFragment
public static SupportingConstructorFragment getSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField)
-
-