Interface IBoundNamedInstance
-
- All Superinterfaces:
IInstance,IModelElement,INamedInstance,INamedModelElement
- All Known Subinterfaces:
IBoundAssemblyInstance,IBoundFieldInstance,IBoundFieldValueInstance,IBoundFlagInstance,IBoundNamedModelInstance
- All Known Implementing Classes:
AbstractFieldProperty
public interface IBoundNamedInstance extends INamedInstance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcopyBoundObject(Object fromInstance, Object toInstance)Copy this instance from one parent object to another.ObjectdefaultValue()FieldgetField()Gets the bound Java field associated with this property.default Class<?>getItemType()Get the item type of the bound object.default StringgetJavaFieldName()default StringgetName()IClassBindinggetParentClassBinding()Get theIClassBindingfor the Java class within which this property exists.default Map<QName,Set<String>>getProperties()default TypegetType()Get the actual Java type of the underlying bound object.default ObjectgetValue(Object parentInstance)Get the current value from the providedparentInstanceobject.default voidsetValue(Object parentInstance, Object value)Set the provided value on the provided object.-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IInstance
getContainingDefinition, getContainingModule, getParentContainer
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getModelType, getRemarks
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.INamedInstance
getDefinition, getEffectiveDescription, getEffectiveFormalName, getEffectiveName, getXmlNamespace, getXmlQName, toCoordinates
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.INamedModelElement
getDescription, getFormalName, getJsonName, getPropertyValues, getUseName, hasProperty, hasPropertyValue
-
-
-
-
Method Detail
-
getName
default String getName()
- Specified by:
getNamein interfaceINamedModelElement
-
getProperties
@NonNull default Map<QName,Set<String>> getProperties()
- Specified by:
getPropertiesin interfaceINamedModelElement
-
getParentClassBinding
@NonNull IClassBinding getParentClassBinding()
Get theIClassBindingfor the Java class within which this property exists.- Returns:
- the containing class's binding
-
getField
@NonNull Field getField()
Gets the bound Java field associated with this property.- Returns:
- the Java field
-
getJavaFieldName
@NonNull default String getJavaFieldName()
-
getType
@NonNull default Type getType()
Get the actual Java type of the underlying bound object.This may be the same as the what is returned by
getItemType(), or may be a Java collection class.- Returns:
- the raw type of the bound object
-
getItemType
@NonNull default Class<?> getItemType()
Get the item type of the bound object. An item type is the primitive or specialized type that represents that data associated with this binding.- Returns:
- the item type of the bound object
-
getValue
default Object getValue(@NonNull Object parentInstance)
Get the current value from the providedparentInstanceobject. The provided object must be of the type associated with the definition containing this property.- Specified by:
getValuein interfaceINamedInstance- Parameters:
parentInstance- the object associated with the definition containing this property- Returns:
- the value if available, or
nullotherwise
-
setValue
default void setValue(@NonNull Object parentInstance, Object value)
Set the provided value on the provided object. The provided object must be of the item's type associated with this property.- Parameters:
parentInstance- the objectvalue- a value, which may be a simpleTypeor aParameterizedTypefor a collection
-
defaultValue
@Nullable Object defaultValue() throws BindingException
- Throws:
BindingException
-
copyBoundObject
void copyBoundObject(@NonNull Object fromInstance, @NonNull Object toInstance) throws BindingException
Copy this instance from one parent object to another.- Parameters:
fromInstance- the object to copy fromtoInstance- the object to copy to- Throws:
BindingException- if an error occurred while processing the object bindings
-
-