Interface IBoundDefinitionModelComplex

All Superinterfaces:
IAttributable, IBoundDefinition, IBoundDefinitionModel<IBoundObject>, IBoundModelElement, IBoundModelObject<IBoundObject>, IContainer, IDefaultable, IDefinition, IDescribable, IFeatureComplexItemValueHandler, IFeatureContainerFlag<IBoundInstanceFlag>, IFeatureValueConstrained, IItemValueHandler<IBoundObject>, IJsonNamed, IModelDefinition, IModelElement, IModelElementVisitable, INamed, INamedModelElement, IValueConstrained
All Known Subinterfaces:
IBoundDefinitionModelAssembly, IBoundDefinitionModelFieldComplex

public interface IBoundDefinitionModelComplex extends IBoundDefinitionModel<IBoundObject>, IFeatureComplexItemValueHandler
Represents a field or assembly instance bound to Java class.
  • Method Details

    • getJsonProperties

      @NonNull Map<String,IBoundProperty<?>> getJsonProperties(@Nullable Predicate<IBoundInstanceFlag> flagFilter)
      Get a mapping of JSON property names to their corresponding bound properties.
      Parameters:
      flagFilter - a predicate to filter which flag instances to include, or null to include all flags
      Returns:
      a map of property names to bound properties
    • getBeforeDeserializeMethod

      @Nullable Method getBeforeDeserializeMethod()
      Get the "beforeDeserialize" method for this bound class, if one exists.

      This method is called before data is read and applied during deserialization.

      Returns:
      the method, or null if no such method exists
    • callBeforeDeserialize

      default void callBeforeDeserialize(IBoundObject targetObject, IBoundObject parentObject) throws BindingException
      Calls the method named "beforeDeserialize" on each class in the object's hierarchy if the method exists on the class.

      These methods can be used to set the initial state of the target bound object before data is read and applied during deserialization.

      Specified by:
      callBeforeDeserialize in interface IFeatureComplexItemValueHandler
      Parameters:
      targetObject - the data object target to call the method(s) on
      parentObject - the object target's parent object, which is used as the method argument
      Throws:
      BindingException - if an error occurs while calling the method
    • getAfterDeserializeMethod

      @Nullable Method getAfterDeserializeMethod()
      Get the "afterDeserialize" method for this bound class, if one exists.

      This method is called after data is read and applied during deserialization.

      Returns:
      the method, or null if no such method exists
    • callAfterDeserialize

      default void callAfterDeserialize(IBoundObject targetObject, IBoundObject parentObject) throws BindingException
      Calls the method named "afterDeserialize" on each class in the object's hierarchy if the method exists.

      These methods can be used to modify the state of the target bound object after data is read and applied during deserialization.

      Specified by:
      callAfterDeserialize in interface IFeatureComplexItemValueHandler
      Parameters:
      targetObject - the data object target to call the method(s) on
      parentObject - the object target's parent object, which is used as the method argument
      Throws:
      BindingException - if an error occurs while calling the method