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
-
-
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.lang.StringvariableName
-
Constructor Summary
Constructors Constructor Description SupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, java.lang.String variableName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAllFragmentsIn(java.util.Set<SupportingMappingMethod> supportingMappingMethods, java.util.Set<SupportingConstructorFragment> targets)booleanequals(java.lang.Object obj)SupportingMappingMethodgetDefiningMethod()java.util.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)java.lang.StringgetTemplateName()Returns the name of the template to be used for a specific writable type.java.lang.StringgetVariableName()inthashCode()-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateNameForClass, write
-
-
-
-
Field Detail
-
variableName
private final java.lang.String variableName
-
templateName
private final java.lang.String templateName
-
definingMethod
private final SupportingMappingMethod definingMethod
-
-
Constructor Detail
-
SupportingConstructorFragment
public SupportingConstructorFragment(SupportingMappingMethod definingMethod, ConstructorFragment constructorFragment, java.lang.String variableName)
-
-
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.
-
getImportTypes
public java.util.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 java.lang.String getVariableName()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
addAllFragmentsIn
public static void addAllFragmentsIn(java.util.Set<SupportingMappingMethod> supportingMappingMethods, java.util.Set<SupportingConstructorFragment> targets)
-
getSafeConstructorFragment
public static SupportingConstructorFragment getSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField)
-
-