Type Parameters:
TYPE - the Java type of the item
All Known Subinterfaces:
IBoundDefinitionFlag, IBoundDefinitionModel<ITEM>, IBoundDefinitionModelAssembly, IBoundDefinitionModelComplex, IBoundDefinitionModelField<ITEM>, IBoundDefinitionModelFieldComplex, IBoundFieldValue, IBoundInstance<ITEM>, IBoundInstanceFlag, IBoundInstanceModel<ITEM>, IBoundInstanceModelAssembly, IBoundInstanceModelChoiceGroup, IBoundInstanceModelField<ITEM>, IBoundInstanceModelFieldComplex, IBoundInstanceModelFieldScalar, IBoundInstanceModelGroupedAssembly, IBoundInstanceModelGroupedField, IBoundInstanceModelGroupedNamed, IBoundInstanceModelNamed<ITEM>, IBoundModelObject<ITEM>, IBoundProperty<ITEM>, IFeatureComplexItemValueHandler, IFeatureScalarItemValueHandler

public interface IItemValueHandler<TYPE>
A feature interface for handling read, writing, and copying item objects, which are the data building blocks of a Metaschema module instance.
  • Method Details

    • readItem

      @Nullable TYPE readItem(@Nullable IBoundObject parent, @NonNull IItemReadHandler handler) throws IOException
      Parse and return an item.
      Parameters:
      parent - the parent Java object to use for serialization callbacks, or null if there is no parent
      handler - the item parsing handler
      Returns:
      the Java object representing the parsed item
      Throws:
      IOException - if an error occurred while parsing
    • writeItem

      void writeItem(@NonNull TYPE item, @NonNull IItemWriteHandler handler) throws IOException
      Write the provided item.
      Parameters:
      item - the data to write
      handler - the item writing handler
      Throws:
      IOException - if an error occurred while writing
    • deepCopyItem

      @NonNull TYPE deepCopyItem(@NonNull TYPE item, @Nullable IBoundObject parentInstance) throws BindingException
      Create and return a deep copy of the provided item.
      Parameters:
      item - the item to copy
      parentInstance - an optional parent object to use for serialization callbacks
      Returns:
      the new deep copy
      Throws:
      BindingException - if an error occurred while analyzing the bound objects