Module dev.metaschema.core
Package dev.metaschema.core.model
Interface IFeatureDefinitionReferenceInstance<DEFINITION extends IDefinition,INSTANCE extends INamedInstance>
- Type Parameters:
DEFINITION- the Java type of the referenced definitionINSTANCE- the Java type of the inline instance (when definition is inline)
- All Superinterfaces:
IAttributable,IDefaultable,IDescribable,IInstance,IJsonNamed,IModelElement,IModelElementVisitable,INamed,INamedInstance,INamedModelElement
- All Known Implementing Classes:
AbstractAssemblyInstance,AbstractFieldInstance
public interface IFeatureDefinitionReferenceInstance<DEFINITION extends IDefinition,INSTANCE extends INamedInstance>
extends INamedInstance
Represents an instance that references a definition.
This interface provides common functionality for instances that reference definitions rather than defining their own inline structure. It handles effective value resolution by delegating to the referenced definition when the instance does not override a value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.metaschema.core.model.IAttributable
IAttributable.Key -
Field Summary
Fields inherited from interface dev.metaschema.core.model.IAttributable
DEFAULT_PROPERY_NAMESPACE -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the definition of this instance.default ObjectThe resolved default value, which allows an instance to override a definition's default value.default MarkupLineGet the text that describes the basic use of the element, which allows an instance to override a definition's description.default StringThe resolved formal display name, which allows an instance to override a definition's name.default IntegerGet the index value to use for binary naming based on the provided index values.default StringGet the name to use based on the provided names.default INSTANCEGet the instance this definition is combined with.default booleanDetermine if the definition of this instance is declared inline.Methods inherited from interface dev.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getFormalNameMethods inherited from interface dev.metaschema.core.model.IInstance
getContainingDefinition, getParentContainer, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getModelType, getRemarksMethods inherited from interface dev.metaschema.core.model.IModelElementVisitable
acceptMethods inherited from interface dev.metaschema.core.model.INamed
getIndex, getName, getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedInstance
getReferencedDefinitionQNameMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonName
-
Method Details
-
getDefinition
DEFINITION getDefinition()Description copied from interface:INamedInstanceRetrieve the definition of this instance.- Specified by:
getDefinitionin interfaceINamedInstance- Returns:
- the corresponding definition
-
isInlineDefinition
default boolean isInlineDefinition()Description copied from interface:INamedInstanceDetermine if the definition of this instance is declared inline.- Specified by:
isInlineDefinitionin interfaceINamedInstance- Returns:
trueif the definition of this instance is declared inline orfalseotherwise
-
getInlineInstance
Get the instance this definition is combined with.- Returns:
- the instance or
nullif the definition is not inline
-
getEffectiveFormalName
Description copied from interface:IDescribableThe resolved formal display name, which allows an instance to override a definition's name.- Specified by:
getEffectiveFormalNamein interfaceIDescribable- Returns:
- the formal name or
nullif not defined
-
getEffectiveDescription
Description copied from interface:IDescribableGet the text that describes the basic use of the element, which allows an instance to override a definition's description.- Specified by:
getEffectiveDescriptionin interfaceIDescribable- Returns:
- a line of markup text or
nullif not defined
-
getEffectiveName
Description copied from interface:INamedGet the name to use based on the provided names. This method will return the use name provided byINamed.getUseName()if the call is notnull, and fall back to the name provided byINamed.getName()otherwise. This is the model name to use for the for an instance where the instance is referenced.- Specified by:
getEffectiveNamein interfaceINamed- Returns:
- the use name if available, or the name if not
- See Also:
-
getEffectiveIndex
Description copied from interface:INamedGet the index value to use for binary naming based on the provided index values.This method will return the use index value provided by
INamed.getUseIndex()if the call result is notnull, and fall back to the index value provided byINamed.getIndex()otherwise.- Specified by:
getEffectiveIndexin interfaceINamed- Returns:
- the index value if available, or
nullotherwise
-
getEffectiveDefaultValue
The resolved default value, which allows an instance to override a definition's default value.- Specified by:
getEffectiveDefaultValuein interfaceIDefaultable- Returns:
- the default value or
nullif not defined on either the instance or definition
-