Class DefaultObjectMapperFactory
- java.lang.Object
-
- ninja.leaping.configurate.objectmapping.DefaultObjectMapperFactory
-
- All Implemented Interfaces:
ObjectMapperFactory
public class DefaultObjectMapperFactory extends Object implements ObjectMapperFactory
Factory for a basicObjectMapper
.
-
-
Constructor Summary
Constructors Constructor Description DefaultObjectMapperFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
DefaultObjectMapperFactory
public DefaultObjectMapperFactory()
-
-
Method Detail
-
getInstance
public static @NonNull ObjectMapperFactory getInstance()
-
getMapper
public <T> @NonNull ObjectMapper<T> getMapper(@NonNull Class<T> type) throws ObjectMappingException
Description 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 ObjectMappingException
Description 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
-
-