public class SupportingMappingMethod extends MappingMethod
BuiltInMethod
.
Specific templates all point to this class, for instance:
XmlGregorianCalendarToCalendar
,
but also used fields and constructor elements, e.g.
FinalField
and
NewDatatypeFactoryConstructorFragment
Writable.Context
Constructor and Description |
---|
SupportingMappingMethod(BuiltInMethod method,
Set<Field> existingFields) |
SupportingMappingMethod(HelperMethod method) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Type |
findType(String name)
Finds a
Type by a given name. |
Set<Type> |
getImportTypes()
Returns a set containing those
Type s referenced by this model element for which an import statement needs
to be declared. |
SupportingConstructorFragment |
getSupportingConstructorFragment() |
Field |
getSupportingField() |
String |
getTemplateName()
Returns the name of the template to be used for a specific writable type.
|
int |
hashCode() |
getAccessibility, getAfterMappingReferences, getBeforeMappingReferencesWithMappingTarget, getBeforeMappingReferencesWithoutMappingTarget, getName, getParameterNames, getParameters, getResultName, getResultType, getReturnType, getSourceParameters, getThrownTypes, isExistingInstanceMapping, isStatic, toString
getTemplateNameForClass, write
public SupportingMappingMethod(BuiltInMethod method, Set<Field> existingFields)
public SupportingMappingMethod(HelperMethod method)
public String getTemplateName()
FreeMarkerWritable
FreeMarkerWritable.getTemplateNameForClass(Class)
is called with getClass()
, but this can be customized by
overriding this method if required.getTemplateName
in class FreeMarkerWritable
null
.public Set<Type> getImportTypes()
ModelElement
Type
s referenced by this model element for which an import statement needs
to be declared.getImportTypes
in class MappingMethod
null
.public Type findType(String name)
Type
by a given name. The name
will be compared to the fully-qualified and also simple
names of the importTypes
.name
- Fully-qualified or simple name of the type.null
.IllegalArgumentException
- In case no Type
was found for given name.public Field getSupportingField()
public SupportingConstructorFragment getSupportingConstructorFragment()
public int hashCode()
hashCode
in class MappingMethod
public boolean equals(Object obj)
equals
in class MappingMethod
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.