Class MapperUtil

java.lang.Object
com.skava.helper.MapperUtil

public final class MapperUtil extends Object
This class contains common utility functions which are using order process. It's contains only static functions.
  • Field Details

    • objectMapper

      public static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
  • Method Details

    • getReader

      public static <T> com.fasterxml.jackson.databind.ObjectReader getReader(Class<T> requiredType)
      Method to get the reader object for the given type
      Type Parameters:
      T - - any type of class
      Parameters:
      requiredType - - new reader instance that is configured to data bind into specified type.
      Returns:
      newly configured instance.
    • castTypeFromString

      public static <T> T castTypeFromString(String content, Class<T> requiredType)
      Method to convert the given JsonNode content to required class
      Type Parameters:
      T - - type reference
      Parameters:
      content - - string data
      requiredType - Contains the return type
      Returns:
      class