Interface IBoundInstanceModelAny

All Superinterfaces:
IAnyInstance, IDefaultable, IFeatureJavaField, IGroupable, IInstance, IInstanceAbsolute, IModelElement, IModelElementVisitable, IModelInstance, IModelInstanceAbsolute, IValued, IValuedMutable

public interface IBoundInstanceModelAny extends IAnyInstance, IFeatureJavaField
Represents an any instance bound to a Java field annotated with @BoundAny.

This interface bridges the core IAnyInstance with the databind binding layer, providing reflective access to the IAnyContent field on a bound object.

  • Method Details

    • newInstance

      @NonNull static IBoundInstanceModelAny newInstance(@NonNull Field field, @NonNull IBoundDefinitionModelAssembly containingDefinition)
      Create a new bound any instance.
      Parameters:
      field - the Java field annotated with @BoundAny
      containingDefinition - the assembly definition containing this instance
      Returns:
      the new bound any instance
    • getContainingDefinition

      @NonNull IBoundDefinitionModelAssembly getContainingDefinition()
      Get the containing assembly definition for this instance.
      Specified by:
      getContainingDefinition in interface IAnyInstance
      Specified by:
      getContainingDefinition in interface IInstance
      Specified by:
      getContainingDefinition in interface IModelInstance
      Returns:
      the containing assembly definition
    • getAnyContent

      @Nullable default IAnyContent getAnyContent(@NonNull Object parent)
      Get the IAnyContent value from the parent bound object.
      Parameters:
      parent - the parent object containing the bound field
      Returns:
      the captured unmodeled content, or null if no content has been captured
    • setAnyContent

      default void setAnyContent(@NonNull Object parent, @Nullable IAnyContent value)
      Set the IAnyContent value on the parent bound object.
      Parameters:
      parent - the parent object containing the bound field
      value - the unmodeled content to set, or null to clear it