Interface ObjectMapperFactory
-
- All Known Implementing Classes:
DefaultObjectMapperFactory
,GuiceObjectMapperFactory
public interface ObjectMapperFactory
A factory to produceObjectMapper
instances
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> @NonNull ObjectMapper<T>
getMapper(@NonNull TypeToken<T> type)
Creates anObjectMapper
for the given type.<T> @NonNull ObjectMapper<T>
getMapper(@NonNull Class<T> type)
Creates anObjectMapper
for the given type.
-
-
-
Method Detail
-
getMapper
<T> @NonNull ObjectMapper<T> getMapper(@NonNull Class<T> type) throws ObjectMappingException
Creates anObjectMapper
for 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 ObjectMappingException
Creates anObjectMapper
for the given type.- Type Parameters:
T
- The type- Parameters:
type
- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException
- If an exception occured whilst mapping
-
-