Class ObjectMappers


  • public class ObjectMappers
    extends java.lang.Object
    Object Mappers utils.
    Author:
    jumperchen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.fasterxml.jackson.databind.ObjectMapper SETTER_OBJECT_MAPPER  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectMappers()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T convert​(java.lang.Object data, java.lang.Class<? extends T> type)
      Converts any given data into the given type if possible.
      • Methods inherited from class java.lang.Object

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

      • SETTER_OBJECT_MAPPER

        public static final com.fasterxml.jackson.databind.ObjectMapper SETTER_OBJECT_MAPPER
    • Constructor Detail

      • ObjectMappers

        public ObjectMappers()
    • Method Detail

      • convert

        public static <T> T convert​(java.lang.Object data,
                                    java.lang.Class<? extends T> type)
        Converts any given data into the given type if possible. All unknown fields are ignored.