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 SummaryConstructors Modifier Constructor Description protectedBoundInstance(T boundInstance)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods 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 Detail- 
BoundInstanceprotected BoundInstance(T boundInstance) 
 
- 
 - 
Method Detail- 
populatepublic T populate(ConfigurationNode source) throws ObjectMappingException 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
 
 - 
serializepublic void serialize(ConfigurationNode target) throws ObjectMappingException 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.
 
 - 
getInstancepublic T getInstance() Return the instance this mapper is bound to.- Returns:
- The active instance
 
 
- 
 
-