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 ObjectMapperFactorygetInstance()<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.StringtoString()
-
-
-
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:ObjectMapperFactoryCreates anObjectMapperfor the given type.- Specified by:
getMapperin 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:ObjectMapperFactoryCreates anObjectMapperfor the given type.- Specified by:
getMapperin interfaceObjectMapperFactory- Type Parameters:
T- The type- Parameters:
type- The type- Returns:
- An object mapper
- Throws:
ObjectMappingException- If an exception occured whilst mapping
-
-