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 protectedBoundInstance(T boundInstance) -
Method Summary
Modifier and Type Method Description TgetInstance()Return the instance this mapper is bound to.Tpopulate(ConfigurationNode source)Populate the annotated fields in a pre-created objectvoidserialize(ConfigurationNode target)Serialize the data contained in annotated fields to the configuration node.
-
Constructor Details
-
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
-