Package | Description |
---|---|
ninja.leaping.configurate | |
ninja.leaping.configurate.objectmapping | |
ninja.leaping.configurate.objectmapping.serialize |
Modifier and Type | Method and Description |
---|---|
default <T> List<T> |
ConfigurationNode.getList(TypeToken<T> type)
If this node has list values, this function unwraps them and converts them to an appropriate type based on the
provided type.
|
<T> List<T> |
SimpleConfigurationNode.getList(TypeToken<T> type,
List<T> def) |
<T> List<T> |
ConfigurationNode.getList(TypeToken<T> type,
List<T> def)
If this node has list values, this function unwraps them and converts them to an appropriate type based on the
provided type.
|
<T> List<T> |
SimpleConfigurationNode.getList(TypeToken<T> type,
Supplier<List<T>> defSupplier) |
<T> List<T> |
ConfigurationNode.getList(TypeToken<T> type,
Supplier<List<T>> defSupplier)
If this node has list values, this function unwraps them and converts them to an appropriate type based on the
provided type.
|
default <T> T |
ConfigurationNode.getValue(TypeToken<T> type)
Get the current value associated with this node.
|
<T> T |
SimpleConfigurationNode.getValue(TypeToken<T> type,
Supplier<T> defSupplier) |
<T> T |
ConfigurationNode.getValue(TypeToken<T> type,
Supplier<T> defSupplier)
Get the current value associated with this node.
|
<T> T |
SimpleConfigurationNode.getValue(TypeToken<T> type,
T def) |
<T> T |
ConfigurationNode.getValue(TypeToken<T> type,
T def)
Get the current value associated with this node.
|
default <T> ConfigurationNode |
ConfigurationNode.setValue(TypeToken<T> type,
T value)
Set this node's value to the given value.
|
Modifier and Type | Class and Description |
---|---|
class |
InvalidTypeException |
Modifier and Type | Method and Description |
---|---|
ObjectMapper.BoundInstance |
ObjectMapper.bindToNew()
Returns a view on this mapper that is bound to a newly created object instance
|
protected void |
ObjectMapper.collectFields(Map<String,ObjectMapper.FieldData> cachedFields,
Class<? super T> clazz) |
protected T |
ObjectMapper.constructObject()
Create a new instance of an object of the appropriate type.
|
void |
ObjectMapper.FieldData.deserializeFrom(Object instance,
ConfigurationNode node) |
static <T> ObjectMapper<T> |
ObjectMapper.forClass(Class<T> clazz)
Create a new object mapper that can work with objects of the given class
|
static <T> ObjectMapper.BoundInstance |
ObjectMapper.forObject(T obj) |
<T> ObjectMapper<T> |
GuiceObjectMapperFactory.getMapper(Class<T> type) |
<T> ObjectMapper<T> |
ObjectMapperFactory.getMapper(Class<T> type) |
<T> ObjectMapper<T> |
DefaultObjectMapperFactory.getMapper(Class<T> type) |
T |
ObjectMapper.BoundInstance.populate(ConfigurationNode source)
Populate the annotated fields in a pre-created object
|
void |
ObjectMapper.BoundInstance.serialize(ConfigurationNode target)
Serialize the data contained in annotated fields to the configuration node.
|
void |
ObjectMapper.FieldData.serializeTo(Object instance,
ConfigurationNode node) |
Constructor and Description |
---|
FieldData(Field field,
String comment) |
ObjectMapper(Class<T> clazz)
Create a new object mapper of a given type
|
Modifier and Type | Method and Description |
---|---|
T |
TypeSerializer.deserialize(TypeToken<?> type,
ConfigurationNode value)
Deserialize an object required to be of a given type from the given configuration node
|
void |
TypeSerializer.serialize(TypeToken<?> type,
T obj,
ConfigurationNode value) |
Copyright © 2014–2017. All rights reserved.