public class DefaultConversionContext extends Object implements ConversionContext
ConversionContext
passed to conversion providers.Constructor and Description |
---|
DefaultConversionContext(TypeFactory typeFactory,
FormattingMessager messager,
Type sourceType,
Type targetType,
FormattingParameters formattingParameters) |
Modifier and Type | Method and Description |
---|---|
String |
getDateFormat()
Returns the date format if this conversion or built-in method is from String to a date type (e.g.
|
protected FormattingMessager |
getMessager() |
String |
getNumberFormat() |
Type |
getTargetType()
Returns the target type of this conversion.
|
TypeFactory |
getTypeFactory() |
public DefaultConversionContext(TypeFactory typeFactory, FormattingMessager messager, Type sourceType, Type targetType, FormattingParameters formattingParameters)
public Type getTargetType()
ConversionContext
getTargetType
in interface ConversionContext
public String getNumberFormat()
getNumberFormat
in interface ConversionContext
public String getDateFormat()
ConversionContext
Date
)
or vice versa.getDateFormat
in interface ConversionContext
null
is
returned for other types or if not given.public TypeFactory getTypeFactory()
getTypeFactory
in interface ConversionContext
protected FormattingMessager getMessager()
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.