Package com.skava.helper
Class MapperUtil
java.lang.Object
com.skava.helper.MapperUtil
This class contains common utility functions which are using order process.
It's contains only static functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ObjectMapper
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
castTypeFromString
(String content, Class<T> requiredType) Method to convert the given JsonNode content to required classstatic <T> com.fasterxml.jackson.databind.ObjectReader
Method to get the reader object for the given type
-
Field Details
-
objectMapper
public static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Method Details
-
getReader
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
Method to convert the given JsonNode content to required class- Type Parameters:
T
- - type reference- Parameters:
content
- - string datarequiredType
- Contains the return type- Returns:
- class
-