Module dev.metaschema.databind
Package dev.metaschema.databind.model
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 TypeMethodDescriptiondefault dev.metaschema.core.model.IAnyContentgetAnyContent(Object parent) Get theIAnyContentvalue from the parent bound object.Get the containing assembly definition for this instance.static IBoundInstanceModelAnynewInstance(Field field, IBoundDefinitionModelAssembly containingDefinition) Create a new boundanyinstance.default voidsetAnyContent(Object parent, dev.metaschema.core.model.IAnyContent value) Set theIAnyContentvalue on the parent bound object.Methods inherited from interface dev.metaschema.core.model.IAnyInstance
accept, getEffectiveXmlGroupAsQName, getMaxOccurs, getMinOccurs, getModelType, isEffectiveValueWrappedInXml, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getType, getValue, setValueMethods inherited from interface dev.metaschema.core.model.IGroupable
getGroupAsName, getItemValues, getJsonGroupAsBehavior, getXmlGroupAsBehaviorMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getRemarksMethods 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 boundanyinstance.- Parameters:
field- the Java field annotated with@BoundAnycontainingDefinition- the assembly definition containing this instance- Returns:
- the new bound
anyinstance
-
getContainingDefinition
Get the containing assembly definition for this instance.- Specified by:
getContainingDefinitionin interfacedev.metaschema.core.model.IAnyInstance- Specified by:
getContainingDefinitionin interfacedev.metaschema.core.model.IInstance- Specified by:
getContainingDefinitionin interfacedev.metaschema.core.model.IModelInstance- Returns:
- the containing assembly definition
-
getAnyContent
Get theIAnyContentvalue from the parent bound object.- Parameters:
parent- the parent object containing the bound field- Returns:
- the captured unmodeled content, or
nullif no content has been captured
-
setAnyContent
default void setAnyContent(@NonNull Object parent, @Nullable dev.metaschema.core.model.IAnyContent value) Set theIAnyContentvalue on the parent bound object.- Parameters:
parent- the parent object containing the bound fieldvalue- the unmodeled content to set, ornullto clear it
-