Class ConversionUtils

java.lang.Object
org.mapstruct.ap.internal.conversion.ConversionUtils

public final class ConversionUtils extends Object
Methods mainly used in SimpleConversion classes, e. g. to get the correct String representation of various types that could be used in generated sources.
Author:
Christian Bandowski
  • Method Details

    • bigDecimal

      public static String bigDecimal(ConversionContext conversionContext)
      Name for BigDecimal.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • bigInteger

      public static String bigInteger(ConversionContext conversionContext)
      Name for BigInteger.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • locale

      public static String locale(ConversionContext conversionContext)
      Name for Locale.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • currency

      public static String currency(ConversionContext conversionContext)
      Name for Currency.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • sqlDate

      public static String sqlDate(ConversionContext conversionContext)
      Name for Date.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • time

      public static String time(ConversionContext conversionContext)
      Name for Time.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • timestamp

      public static String timestamp(ConversionContext conversionContext)
      Name for Timestamp.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • decimalFormat

      public static String decimalFormat(ConversionContext conversionContext)
      Name for DecimalFormat.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • simpleDateFormat

      public static String simpleDateFormat(ConversionContext conversionContext)
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • date

      public static String date(ConversionContext conversionContext)
      Name for Date.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • zoneOffset

      public static String zoneOffset(ConversionContext conversionContext)
      Name for ZoneOffset.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • zoneId

      public static String zoneId(ConversionContext conversionContext)
      Name for ZoneId.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • localDate

      public static String localDate(ConversionContext conversionContext)
      Name for LocalDate.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • localDateTime

      public static String localDateTime(ConversionContext conversionContext)
      Name for LocalDateTime.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • zonedDateTime

      public static String zonedDateTime(ConversionContext conversionContext)
      Name for ZonedDateTime.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • dateTimeFormatter

      public static String dateTimeFormatter(ConversionContext conversionContext)
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • dateTimeFormat

      public static String dateTimeFormat(ConversionContext conversionContext)
      Name for org.joda.time.format.DateTimeFormat.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • stringBuilder

      public static String stringBuilder(ConversionContext conversionContext)
      Name for StringBuilder.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • uuid

      public static String uuid(ConversionContext conversionContext)
      Name for UUID.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • url

      public static String url(ConversionContext conversionContext)
      Name for URL.
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.
    • decimalFormatSymbols

      public static String decimalFormatSymbols(ConversionContext conversionContext)
      Parameters:
      conversionContext - Conversion context
      Returns:
      Name or fully-qualified name.