Package net.xun.lib.common.internal.nbt
Class NbtFieldAccessor
java.lang.Object
net.xun.lib.common.internal.nbt.NbtFieldAccessor
Runtime field accessor for
PersistentNbt annotated fields.
Wraps reflection operations with MethodHandles for better performance
and integrates with the INbtAdapter system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetField()voidReads a field's value from NBT using its configured adaptervoidWrites a field's value to NBT using its configured adapter
-
Constructor Details
-
NbtFieldAccessor
-
-
Method Details
-
write
Writes a field's value to NBT using its configured adapter- Parameters:
instance- Containing object instancetag- Target compound tag
-
load
Reads a field's value from NBT using its configured adapter- Parameters:
instance- Target object to modifytag- Source compound tag
-
getField
-
getGetter
-
getSetter
-
getAdapter
-