Class ConversionUtils
- java.lang.Object
-
- org.mapstruct.ap.internal.conversion.ConversionUtils
-
public final class ConversionUtils extends Object
Methods mainly used inSimpleConversion
classes, e. g. to get the correct String representation of various types that could be used in generated sources.- Author:
- Christian Bandowski
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
bigDecimal(ConversionContext conversionContext)
Name forBigDecimal
.static String
bigInteger(ConversionContext conversionContext)
Name forBigInteger
.static String
currency(ConversionContext conversionContext)
Name forCurrency
.static String
date(ConversionContext conversionContext)
Name forDate
.static String
dateTimeFormat(ConversionContext conversionContext)
Name fororg.joda.time.format.DateTimeFormat
.static String
dateTimeFormatter(ConversionContext conversionContext)
Name forDateTimeFormatter
.static String
decimalFormat(ConversionContext conversionContext)
Name forDecimalFormat
.static String
localDateTime(ConversionContext conversionContext)
Name forLocalDateTime
.static String
locale(ConversionContext conversionContext)
Name forLocale
.static String
simpleDateFormat(ConversionContext conversionContext)
Name forSimpleDateFormat
.static String
sqlDate(ConversionContext conversionContext)
Name forDate
.static String
stringBuilder(ConversionContext conversionContext)
Name forStringBuilder
.static String
time(ConversionContext conversionContext)
Name forTime
.static String
timestamp(ConversionContext conversionContext)
Name forTimestamp
.static String
url(ConversionContext conversionContext)
Name forURL
.static String
uuid(ConversionContext conversionContext)
Name forUUID
.static String
zonedDateTime(ConversionContext conversionContext)
Name forZonedDateTime
.static String
zoneId(ConversionContext conversionContext)
Name forZoneId
.static String
zoneOffset(ConversionContext conversionContext)
Name forZoneOffset
.
-
-
-
Method Detail
-
bigDecimal
public static String bigDecimal(ConversionContext conversionContext)
Name forBigDecimal
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
bigInteger
public static String bigInteger(ConversionContext conversionContext)
Name forBigInteger
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
locale
public static String locale(ConversionContext conversionContext)
Name forLocale
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
currency
public static String currency(ConversionContext conversionContext)
Name forCurrency
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
sqlDate
public static String sqlDate(ConversionContext conversionContext)
Name forDate
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
time
public static String time(ConversionContext conversionContext)
Name forTime
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
timestamp
public static String timestamp(ConversionContext conversionContext)
Name forTimestamp
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
decimalFormat
public static String decimalFormat(ConversionContext conversionContext)
Name forDecimalFormat
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
simpleDateFormat
public static String simpleDateFormat(ConversionContext conversionContext)
Name forSimpleDateFormat
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
date
public static String date(ConversionContext conversionContext)
Name forDate
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
zoneOffset
public static String zoneOffset(ConversionContext conversionContext)
Name forZoneOffset
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
zoneId
public static String zoneId(ConversionContext conversionContext)
Name forZoneId
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
localDateTime
public static String localDateTime(ConversionContext conversionContext)
Name forLocalDateTime
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
zonedDateTime
public static String zonedDateTime(ConversionContext conversionContext)
Name forZonedDateTime
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
dateTimeFormatter
public static String dateTimeFormatter(ConversionContext conversionContext)
Name forDateTimeFormatter
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
dateTimeFormat
public static String dateTimeFormat(ConversionContext conversionContext)
Name fororg.joda.time.format.DateTimeFormat
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
stringBuilder
public static String stringBuilder(ConversionContext conversionContext)
Name forStringBuilder
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
uuid
public static String uuid(ConversionContext conversionContext)
Name forUUID
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
url
public static String url(ConversionContext conversionContext)
Name forURL
.- Parameters:
conversionContext
- Conversion context- Returns:
- Name or fully-qualified name.
-
-