Interface IFeatureComplexItemValueHandler
- All Superinterfaces:
IItemValueHandler<IBoundObject>
- All Known Subinterfaces:
IBoundDefinitionModelAssembly
,IBoundDefinitionModelComplex
,IBoundDefinitionModelFieldComplex
,IBoundInstanceModelAssembly
,IBoundInstanceModelFieldComplex
,IBoundInstanceModelGroupedAssembly
,IBoundInstanceModelGroupedField
,IBoundInstanceModelGroupedNamed
-
Method Summary
Modifier and TypeMethodDescriptionvoid
callAfterDeserialize
(IBoundObject targetObject, IBoundObject parentObject) void
callBeforeDeserialize
(IBoundObject targetObject, IBoundObject parentObject) deepCopyItem
(IBoundObject item, IBoundObject parentInstance) Create and return a deep copy of the provided item.Class<? extends IBoundObject>
The class this binding is to.Get the Metaschema definition representing the bound complex data.Map<String,
IBoundProperty<?>> Get the mapping of JSON property names to property bindings.default <CLASS extends IBoundObject>
CLASSnewInstance
(Supplier<IMetaschemaData> supplier) Gets a new instance of the bound class.Methods inherited from interface gov.nist.secauto.metaschema.databind.model.info.IItemValueHandler
readItem, writeItem
-
Method Details
-
getDefinition
Get the Metaschema definition representing the bound complex data.- Returns:
- the definition
-
getJsonProperties
Get the mapping of JSON property names to property bindings.- Returns:
- the mapping
-
deepCopyItem
@NonNull IBoundObject deepCopyItem(@NonNull IBoundObject item, @Nullable IBoundObject parentInstance) throws BindingException Description copied from interface:IItemValueHandler
Create and return a deep copy of the provided item.- Specified by:
deepCopyItem
in interfaceIItemValueHandler<IBoundObject>
- Parameters:
item
- the item to copyparentInstance
- an optional parent object to use for serialization callbacks- Returns:
- the new deep copy
- Throws:
BindingException
- if an error occurred while analyzing the bound objects
-
getBoundClass
The class this binding is to.- Returns:
- the bound class
-
newInstance
@NonNull default <CLASS extends IBoundObject> CLASS newInstance(@Nullable Supplier<IMetaschemaData> supplier) Gets a new instance of the bound class.- Type Parameters:
CLASS
- the type of the bound class- Parameters:
supplier
- the metaschema data generator used to capture parse information (i.e., location)- Returns:
- a Java object for the class
- Throws:
RuntimeException
- if the instance cannot be created due to a binding error
-
callBeforeDeserialize
void callBeforeDeserialize(@NonNull IBoundObject targetObject, @Nullable IBoundObject parentObject) throws BindingException - Throws:
BindingException
-
callAfterDeserialize
void callAfterDeserialize(@NonNull IBoundObject targetObject, @Nullable IBoundObject parentObject) throws BindingException - Throws:
BindingException
-