Class AbstractNumberToStringConversion
- java.lang.Object
-
- org.mapstruct.ap.internal.conversion.SimpleConversion
-
- org.mapstruct.ap.internal.conversion.AbstractNumberToStringConversion
-
- All Implemented Interfaces:
ConversionProvider
- Direct Known Subclasses:
BigDecimalToStringConversion,BigIntegerToStringConversion,PrimitiveToStringConversion,WrapperToStringConversion
public abstract class AbstractNumberToStringConversion extends SimpleConversion
Abstract base class forPrimitiveToStringConversion,WrapperToStringConversion,BigDecimalToStringConversionandBigIntegerToStringConversionContains shared utility methods.- Author:
- Ciaran Liedeman
-
-
Constructor Summary
Constructors Constructor Description AbstractNumberToStringConversion(boolean sourceTypeNumberSubclass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Type>getFromConversionExceptionTypes(ConversionContext conversionContext)protected Set<Type>getFromConversionImportTypes(ConversionContext conversionContext)Returns a set with imported types of the "from" conversion.Set<Type>getToConversionImportTypes(ConversionContext conversionContext)Returns a set with imported types of the "to" conversion.protected booleanrequiresDecimalFormat(ConversionContext conversionContext)-
Methods inherited from class org.mapstruct.ap.internal.conversion.SimpleConversion
from, getFromExpression, getRequiredHelperMethods, getToConversionExceptionTypes, getToExpression, to
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mapstruct.ap.internal.conversion.ConversionProvider
getRequiredHelperFields
-
-
-
-
Method Detail
-
getToConversionImportTypes
public Set<Type> getToConversionImportTypes(ConversionContext conversionContext)
Description copied from class:SimpleConversionReturns a set with imported types of the "to" conversion. Defaults to an empty set; can be overridden in sub-classes to return the required types.- Overrides:
getToConversionImportTypesin classSimpleConversion- Parameters:
conversionContext- the conversion context- Returns:
- conversion types required in the "to" conversion
-
requiresDecimalFormat
protected boolean requiresDecimalFormat(ConversionContext conversionContext)
-
getFromConversionImportTypes
protected Set<Type> getFromConversionImportTypes(ConversionContext conversionContext)
Description copied from class:SimpleConversionReturns a set with imported types of the "from" conversion. Defaults to an empty set; can be overridden in sub-classes to return the required types.- Overrides:
getFromConversionImportTypesin classSimpleConversion- Parameters:
conversionContext- the conversion context- Returns:
- conversion types required in the "from" conversion
-
getFromConversionExceptionTypes
protected List<Type> getFromConversionExceptionTypes(ConversionContext conversionContext)
- Overrides:
getFromConversionExceptionTypesin classSimpleConversion
-
-