Class ObjectMapper.BoundInstance
java.lang.Object
ninja.leaping.configurate.objectmapping.ObjectMapper.BoundInstance
- Enclosing class:
- ObjectMapper<T>
public class ObjectMapper.BoundInstance extends Object
Represents an object mapper bound to a certain instance of the object
-
Constructor Summary
Constructors Modifier Constructor Description protected
BoundInstance(T boundInstance)
-
Method Summary
Modifier and Type Method Description T
getInstance()
Return the instance this mapper is bound to.T
populate(ConfigurationNode source)
Populate the annotated fields in a pre-created objectvoid
serialize(ConfigurationNode target)
Serialize the data contained in annotated fields to the configuration node.
-
Constructor Details
-
BoundInstance
-
-
Method Details
-
populate
Populate the annotated fields in a pre-created object- Parameters:
source
- The source to get data from- Returns:
- The object provided, for easier chaining
- Throws:
ObjectMappingException
- If an error occurs while populating data
-
serialize
Serialize the data contained in annotated fields to the configuration node.- Parameters:
target
- The target node to serialize to- Throws:
ObjectMappingException
- if serialization was not possible due to some error.
-
getInstance
Return the instance this mapper is bound to.- Returns:
- The active instance
-