Interface ObjectMapperFactory
- All Known Implementing Classes:
DefaultObjectMapperFactory,GuiceObjectMapperFactory
public interface ObjectMapperFactory
A factory to produce
ObjectMapper instances-
Method Summary
Modifier and Type Method Description default <T> @NonNull ObjectMapper<T>getMapper(@NonNull TypeToken<T> type)Creates anObjectMapperfor the given type.<T> @NonNull ObjectMapper<T>getMapper(@NonNull Class<T> type)Creates anObjectMapperfor the given type.
-
Method Details
-
getMapper
Creates anObjectMapperfor the given type.- Type Parameters:
T- The type- Parameters:
type- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException- If an exception occured whilst mapping
-
getMapper
default <T> @NonNull ObjectMapper<T> getMapper(@NonNull TypeToken<T> type) throws ObjectMappingExceptionCreates anObjectMapperfor the given type.- Type Parameters:
T- The type- Parameters:
type- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException- If an exception occured whilst mapping
-