Class DefaultObjectMapperFactory
java.lang.Object
ninja.leaping.configurate.objectmapping.DefaultObjectMapperFactory
- All Implemented Interfaces:
ObjectMapperFactory
public class DefaultObjectMapperFactory extends Object implements ObjectMapperFactory
Factory for a basic
ObjectMapper
.-
Constructor Summary
Constructors Constructor Description DefaultObjectMapperFactory()
-
Method Summary
Modifier and Type Method Description static @NonNull ObjectMapperFactory
getInstance()
<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.String
toString()
-
Constructor Details
-
DefaultObjectMapperFactory
public DefaultObjectMapperFactory()
-
-
Method Details
-
getInstance
-
getMapper
public <T> @NonNull ObjectMapper<T> getMapper(@NonNull Class<T> type) throws ObjectMappingExceptionDescription copied from interface:ObjectMapperFactory
Creates anObjectMapper
for the given type.- Specified by:
getMapper
in interfaceObjectMapperFactory
- Type Parameters:
T
- The type- Parameters:
type
- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException
- If an exception occured whilst mapping
-
getMapper
public <T> @NonNull ObjectMapper<T> getMapper(@NonNull TypeToken<T> type) throws ObjectMappingExceptionDescription copied from interface:ObjectMapperFactory
Creates anObjectMapper
for the given type.- Specified by:
getMapper
in interfaceObjectMapperFactory
- Type Parameters:
T
- The type- Parameters:
type
- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException
- If an exception occured whilst mapping
-
toString
-