Interface IBoundInstanceModel<ITEM>
- Type Parameters:
ITEM
- the Java type for associated bound objects
- All Superinterfaces:
IBoundInstance<ITEM>
,IBoundModelElement
,IBoundModelObject<ITEM>
,IBoundProperty<ITEM>
,IDefaultable
,IFeatureJavaField
,IGroupable
,IInstance
,IInstanceAbsolute
,IItemValueHandler<ITEM>
,IJsonNamed
,IModelElement
,IModelInstance
,IModelInstanceAbsolute
,IValued
,IValuedMutable
- All Known Subinterfaces:
IBoundInstanceModelAssembly
,IBoundInstanceModelChoiceGroup
,IBoundInstanceModelField<ITEM>
,IBoundInstanceModelFieldComplex
,IBoundInstanceModelFieldScalar
,IBoundInstanceModelNamed<ITEM>
Represents an assembly or field instance bound to Java data.
-
Field Summary
Fields inherited from interface gov.nist.secauto.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 TypeMethodDescriptionGet the Java binding information for the collection type supported by this instance.getItemJsonKey
(Object item) Get the JSON key flag for the provided item.static Class<?>
getItemType
(Field field) Get the collection Java item type for the Java field associated with this instance.static <TYPE> Class<? extends TYPE>
getItemType
(Field field, Class<TYPE> expectedItemType) Get the collection Java item type for the Java field associated with this instance.default Collection<? extends Object>
getItemValues
(Object value) Get the item values associated with the provided value.default Object
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundModelObject
canHandleXmlQName
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundProperty
deepCopy
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getType
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IGroupable
getEffectiveGroupAsNamespace, getEffectiveXmlGroupAsQName, getGroupAsName, getGroupAsXmlNamespace, getJsonGroupAsBehavior, getMaxOccurs, getMinOccurs, getXmlGroupAsBehavior
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IInstance
toCoordinates
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.info.IItemValueHandler
deepCopyItem, readItem, writeItem
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IJsonNamed
getJsonName
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getModelType, getRemarks
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelInstance
getParentContainer, isEffectiveValueWrappedInXml
-
Method Details
-
getItemType
Get the collection Java item type for the Java field associated with this instance.- Parameters:
field
- the Java field for the instance- Returns:
- the Java item type
-
getItemType
@NonNull static <TYPE> Class<? extends TYPE> getItemType(@NonNull Field field, @NonNull Class<TYPE> expectedItemType) Get the collection Java item type for the Java field associated with this instance.- Type Parameters:
TYPE
- the item's expected Java type- Parameters:
field
- the Java field for the instanceexpectedItemType
- the item's expected Java type, which may be a super type of the item's type- Returns:
- the Java item type
-
getContainingDefinition
- Specified by:
getContainingDefinition
in interfaceIBoundInstance<ITEM>
- Specified by:
getContainingDefinition
in interfaceIInstance
- Specified by:
getContainingDefinition
in interfaceIModelInstance
-
getResolvedDefaultValue
- Specified by:
getResolvedDefaultValue
in interfaceIDefaultable
-
getItemValues
Get the item values associated with the provided value.- Specified by:
getItemValues
in interfaceIGroupable
- Parameters:
value
- the value which may be a singleton or a collection- Returns:
- the ordered collection of values
-
getCollectionInfo
Get the Java binding information for the collection type supported by this instance.- Returns:
- the collection Java binding information
-
getItemJsonKey
Get the JSON key flag for the provided item.- Parameters:
item
- the item to get the JSON key flag for- Returns:
- the JSON key flag
-