Class GsonConverter

  • All Implemented Interfaces:
    Converter<java.lang.Object,​java.lang.Object,​Component>

    public class GsonConverter
    extends GsonConverter
    A Gson converter for Binding Parameter
    Since:
    10.0.0
    Author:
    jameschu
    • Constructor Detail

      • GsonConverter

        public GsonConverter()
    • Method Detail

      • coerceToBean

        public java.lang.Object coerceToBean​(java.lang.Object compAttr,
                                             Component component,
                                             BindContext ctx)
        Description copied from interface: Converter
        Coerces a value to bean value to save to a bean
        Specified by:
        coerceToBean in interface Converter<java.lang.Object,​java.lang.Object,​Component>
        Overrides:
        coerceToBean in class GsonConverter
        Parameters:
        compAttr - the value of component attribute.
        component - the component provides the value
        ctx - the bind context
        Returns:
        the value to save to a bean