Module dev.metaschema.databind
Class AbstractModelInstanceReadHandler<ITEM>
java.lang.Object
dev.metaschema.databind.model.info.AbstractModelInstanceReadHandler<ITEM>
- Type Parameters:
ITEM- the Java type of items being read
- All Implemented Interfaces:
IModelInstanceReadHandler<ITEM>
public abstract class AbstractModelInstanceReadHandler<ITEM>
extends Object
implements IModelInstanceReadHandler<ITEM>
An abstract base class for reading model instance collections.
This class provides the framework for reading collections of items during deserialization, with support for different collection types.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractModelInstanceReadHandler(IBoundInstanceModel<ITEM> instance, IBoundObject parentObject) Construct a new read handler for the provided model instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the collection Java type information associated with this handler.Get the model instance associated with this handler.Get the name of the JSON key flag, if one is configured for this instance.Get the object onto which parsed data will be stored.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.databind.model.info.IModelInstanceReadHandler
readItem, readList, readMap, readSingleton
-
Constructor Details
-
AbstractModelInstanceReadHandler
protected AbstractModelInstanceReadHandler(@NonNull IBoundInstanceModel<ITEM> instance, @NonNull IBoundObject parentObject) Construct a new read handler for the provided model instance.- Parameters:
instance- the model instance to readparentObject- the parent object that will contain the read data
-
-
Method Details
-
getInstance
Get the model instance associated with this handler.- Returns:
- the collection information
-
getCollectionInfo
Get the collection Java type information associated with this handler.- Returns:
- the collection information
-
getParentObject
Get the object onto which parsed data will be stored.- Returns:
- the parentObject
-
getJsonKeyFlagName
Description copied from interface:IModelInstanceReadHandlerGet the name of the JSON key flag, if one is configured for this instance.- Specified by:
getJsonKeyFlagNamein interfaceIModelInstanceReadHandler<ITEM>- Returns:
- the JSON key flag name, or
nullif no JSON key is configured
-