Class PrimitiveToWrapperConversion

  • All Implemented Interfaces:
    ConversionProvider

    public class PrimitiveToWrapperConversion
    extends SimpleConversion
    Conversion between primitive types such as byte and wrapper types such as Integer.
    • Field Detail

      • sourceType

        private final java.lang.Class<?> sourceType
      • targetType

        private final java.lang.Class<?> targetType
    • Constructor Detail

      • PrimitiveToWrapperConversion

        public PrimitiveToWrapperConversion​(java.lang.Class<?> sourceType,
                                            java.lang.Class<?> targetType)
    • Method Detail

      • getToExpression

        public java.lang.String getToExpression​(ConversionContext conversionContext)
        Description copied from class: SimpleConversion
        Returns the conversion string from source to target. The placeholder <SOURCE> can be used to represent a reference to the source value.
        Specified by:
        getToExpression in class SimpleConversion
        Parameters:
        conversionContext - A context providing optional information required for creating the conversion.
        Returns:
        The conversion string from source to target
      • getFromExpression

        public java.lang.String getFromExpression​(ConversionContext conversionContext)
        Description copied from class: SimpleConversion
        Returns the conversion string from target to source. The placeholder <SOURCE> can be used to represent a reference to the target value.
        Specified by:
        getFromExpression in class SimpleConversion
        Parameters:
        conversionContext - ConversionContext providing optional information required for creating the conversion.
        Returns:
        The conversion string from target to source