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 void
addAllFragmentsIn(Set<SupportingMappingMethod> supportingMappingMethods, Set<SupportingConstructorFragment> targets)
boolean
equals(Object obj)
SupportingMappingMethod
getDefiningMethod()
Set<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.static SupportingConstructorFragment
getSafeConstructorFragment(SupportingMappingMethod method, ConstructorFragment fragment, Field supportingField)
String
getTemplateName()
Returns the name of the template to be used for a specific writable type.String
getVariableName()
int
hashCode()
-
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: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
.
-
getImportTypes
public Set<Type> getImportTypes()
Description copied from class:ModelElement
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.- Specified by:
getImportTypes
in 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)
-
-