Class GsonMappingProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.Callable<com.google.gson.Gson> factory  
      private static org.slf4j.Logger logger  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T map​(java.lang.Object source, TypeRef<T> targetType, Configuration configuration)  
      <T> T map​(java.lang.Object source, java.lang.Class<T> targetType, Configuration configuration)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • factory

        private final java.util.concurrent.Callable<com.google.gson.Gson> factory
    • Constructor Detail

      • GsonMappingProvider

        public GsonMappingProvider​(com.google.gson.Gson gson)
      • GsonMappingProvider

        public GsonMappingProvider​(java.util.concurrent.Callable<com.google.gson.Gson> factory)
      • GsonMappingProvider

        public GsonMappingProvider()
    • Method Detail

      • map

        public <T> T map​(java.lang.Object source,
                         java.lang.Class<T> targetType,
                         Configuration configuration)
        Specified by:
        map in interface MappingProvider
        Type Parameters:
        T - the mapped result type
        Parameters:
        source - object to map
        targetType - the type the source object should be mapped to
        configuration - current configuration
        Returns:
        return the mapped object
      • map

        public <T> T map​(java.lang.Object source,
                         TypeRef<T> targetType,
                         Configuration configuration)
        Specified by:
        map in interface MappingProvider
        Type Parameters:
        T - the mapped result type
        Parameters:
        source - object to map
        targetType - the type the source object should be mapped to
        configuration - current configuration
        Returns:
        return the mapped object