public abstract class SimpleConversion extends Object implements ConversionProvider
ConversionProvider
s creating TypeConversion
s which don't declare any exception types.Constructor and Description |
---|
SimpleConversion() |
Modifier and Type | Method and Description |
---|---|
Assignment |
from(ConversionContext conversionContext)
Creates the conversion from target to source of a property mapping.
|
protected List<Type> |
getFromConversionExceptionTypes(ConversionContext conversionContext) |
protected Set<Type> |
getFromConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "from" conversion.
|
protected abstract String |
getFromExpression(ConversionContext conversionContext)
Returns the conversion string from target to source.
|
List<HelperMethod> |
getRequiredHelperMethods(ConversionContext conversionContext) |
protected List<Type> |
getToConversionExceptionTypes(ConversionContext conversionContext) |
protected Set<Type> |
getToConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "to" conversion.
|
protected abstract String |
getToExpression(ConversionContext conversionContext)
Returns the conversion string from source to target.
|
Assignment |
to(ConversionContext conversionContext)
Creates the conversion from source to target of a property mapping.
|
public Assignment to(ConversionContext conversionContext)
ConversionProvider
to
in interface ConversionProvider
conversionContext
- ConversionContext providing optional information required for creating the conversion.public Assignment from(ConversionContext conversionContext)
ConversionProvider
from
in interface ConversionProvider
conversionContext
- ConversionContext providing optional information required for creating the conversion.public List<HelperMethod> getRequiredHelperMethods(ConversionContext conversionContext)
getRequiredHelperMethods
in interface ConversionProvider
conversionContext
- ConversionContext providing optional information required for creating the conversion.protected abstract String getToExpression(ConversionContext conversionContext)
<SOURCE>
can be used to represent a
reference to the source value.conversionContext
- A context providing optional information required for creating the conversion.protected abstract String getFromExpression(ConversionContext conversionContext)
<SOURCE>
can be used to represent a
reference to the target value.conversionContext
- ConversionContext providing optional information required for creating the conversion.protected Set<Type> getFromConversionImportTypes(ConversionContext conversionContext)
conversionContext
- the conversion contextprotected Set<Type> getToConversionImportTypes(ConversionContext conversionContext)
conversionContext
- the conversion contextprotected List<Type> getToConversionExceptionTypes(ConversionContext conversionContext)
protected List<Type> getFromConversionExceptionTypes(ConversionContext conversionContext)
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.