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 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 read
      parentObject - the parent object that will contain the read data
  • Method Details

    • getInstance

      @NonNull public IBoundInstanceModel<ITEM> getInstance()
      Get the model instance associated with this handler.
      Returns:
      the collection information
    • getCollectionInfo

      @NonNull public IModelInstanceCollectionInfo<ITEM> getCollectionInfo()
      Get the collection Java type information associated with this handler.
      Returns:
      the collection information
    • getParentObject

      @NonNull public IBoundObject getParentObject()
      Get the object onto which parsed data will be stored.
      Returns:
      the parentObject
    • getJsonKeyFlagName

      public String getJsonKeyFlagName()
      Description copied from interface: IModelInstanceReadHandler
      Get the name of the JSON key flag, if one is configured for this instance.
      Specified by:
      getJsonKeyFlagName in interface IModelInstanceReadHandler<ITEM>
      Returns:
      the JSON key flag name, or null if no JSON key is configured