Interface IBoundInstanceModelAny

All Superinterfaces:
dev.metaschema.core.model.IAnyInstance, dev.metaschema.core.model.IDefaultable, IFeatureJavaField, dev.metaschema.core.model.IGroupable, dev.metaschema.core.model.IInstance, dev.metaschema.core.model.IInstanceAbsolute, dev.metaschema.core.model.IModelElement, dev.metaschema.core.model.IModelElementVisitable, dev.metaschema.core.model.IModelInstance, dev.metaschema.core.model.IModelInstanceAbsolute, dev.metaschema.core.model.IValued, IValuedMutable

public interface IBoundInstanceModelAny extends dev.metaschema.core.model.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.

  • Field Summary

    Fields inherited from interface dev.metaschema.core.model.IGroupable

    DEFAULT_GROUP_AS_MAX_OCCURS, DEFAULT_GROUP_AS_MIN_OCCURS, DEFAULT_JSON_GROUP_AS_BEHAVIOR, DEFAULT_XML_GROUP_AS_BEHAVIOR
  • Method Summary

    Modifier and Type
    Method
    Description
    default dev.metaschema.core.model.IAnyContent
    Get the IAnyContent value from the parent bound object.
    Get the containing assembly definition for this instance.
    newInstance(Field field, IBoundDefinitionModelAssembly containingDefinition)
    Create a new bound any instance.
    default void
    setAnyContent(Object parent, dev.metaschema.core.model.IAnyContent value)
    Set the IAnyContent value on the parent bound object.

    Methods inherited from interface dev.metaschema.core.model.IAnyInstance

    accept, getEffectiveXmlGroupAsQName, getMaxOccurs, getMinOccurs, getModelType, isEffectiveValueWrappedInXml, toCoordinates

    Methods inherited from interface dev.metaschema.core.model.IDefaultable

    getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValue

    Methods inherited from interface dev.metaschema.databind.model.IFeatureJavaField

    getField, getItemType, getType, getValue, setValue

    Methods inherited from interface dev.metaschema.core.model.IGroupable

    getGroupAsName, getItemValues, getJsonGroupAsBehavior, getXmlGroupAsBehavior

    Methods inherited from interface dev.metaschema.core.model.IModelElement

    getContainingModule, getRemarks

    Methods inherited from interface dev.metaschema.core.model.IModelInstance

    getParentContainer
  • 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

      Get the containing assembly definition for this instance.
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IAnyInstance
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IInstance
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IModelInstance
      Returns:
      the containing assembly definition
    • getAnyContent

      @Nullable default dev.metaschema.core.model.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 dev.metaschema.core.model.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