Class CreateDecimalFormat

java.lang.Object
org.mapstruct.ap.internal.model.HelperMethod
org.mapstruct.ap.internal.conversion.CreateDecimalFormat
All Implemented Interfaces:
Method

public class CreateDecimalFormat extends HelperMethod
HelperMethod that creates a DecimalFormat DecimalFormat df = new DecimalFormat( numberFormat ) with setParseBigDecimal set to true.
Author:
Sjaak Derksen
  • Constructor Details

    • CreateDecimalFormat

      public CreateDecimalFormat(TypeFactory typeFactory, boolean withLocale)
  • Method Details

    • getName

      public String getName()
      Description copied from class: HelperMethod
      Returns then name of the method.
      Specified by:
      getName in interface Method
      Overrides:
      getName in class HelperMethod
      Returns:
      default method name is equal to class name of build in method name
    • getImportTypes

      public Set<Type> getImportTypes()
      Description copied from class: HelperMethod
      Returns the types used by this method for which import statements need to be generated. Defaults to the empty set. To be overridden by implementations in case they make use of additional types (note that the parameter and return type don't need to be added).
      Overrides:
      getImportTypes in class HelperMethod
      Returns:
      the types used by this method for which import statements need to be generated
    • getParameter

      public Parameter getParameter()
      Description copied from class: HelperMethod
      There's currently only one parameter foreseen instead of a list of parameter
      Specified by:
      getParameter in class HelperMethod
      Returns:
      the parameter
    • getReturnType

      public Type getReturnType()
      Description copied from interface: Method
      Returns the return type of the method
      Returns:
      return type
    • getOptions

      public MappingMethodOptions getOptions()
      Returns:
      the mapping options for this method
    • describe

      public String describe()
      Returns:
      the short name for error messages when verbose, full name when not
    • getParameters

      public List<Parameter> getParameters()
      Description copied from interface: Method
      In contrast to Method.getSourceParameters() this method returns all parameters
      Specified by:
      getParameters in interface Method
      Overrides:
      getParameters in class HelperMethod
      Returns:
      all parameters