Interface IItemValueHandler<TYPE>

Type Parameters:
TYPE - the Java type of the handled item value
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>
Handler interface for processing bound item values.

This interface provides methods for reading and writing items, as well as deep copying items during binding operations.

  • 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