Interface IFeatureDefinitionReferenceInstance<DEFINITION extends IDefinition,INSTANCE extends INamedInstance>

Type Parameters:
DEFINITION - the Java type of the referenced definition
INSTANCE - 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.

  • Method Details

    • getDefinition

      DEFINITION getDefinition()
      Description copied from interface: INamedInstance
      Retrieve the definition of this instance.
      Specified by:
      getDefinition in interface INamedInstance
      Returns:
      the corresponding definition
    • isInlineDefinition

      default boolean isInlineDefinition()
      Description copied from interface: INamedInstance
      Determine if the definition of this instance is declared inline.
      Specified by:
      isInlineDefinition in interface INamedInstance
      Returns:
      true if the definition of this instance is declared inline or false otherwise
    • getInlineInstance

      @Nullable default INSTANCE getInlineInstance()
      Get the instance this definition is combined with.
      Returns:
      the instance or null if the definition is not inline
    • getEffectiveFormalName

      default String getEffectiveFormalName()
      Description copied from interface: IDescribable
      The resolved formal display name, which allows an instance to override a definition's name.
      Specified by:
      getEffectiveFormalName in interface IDescribable
      Returns:
      the formal name or null if not defined
    • getEffectiveDescription

      default MarkupLine getEffectiveDescription()
      Description copied from interface: IDescribable
      Get the text that describes the basic use of the element, which allows an instance to override a definition's description.
      Specified by:
      getEffectiveDescription in interface IDescribable
      Returns:
      a line of markup text or null if not defined
    • getEffectiveName

      @NonNull default String getEffectiveName()
      Description copied from interface: INamed
      Get the name to use based on the provided names. This method will return the use name provided by INamed.getUseName() if the call is not null, and fall back to the name provided by INamed.getName() otherwise. This is the model name to use for the for an instance where the instance is referenced.
      Specified by:
      getEffectiveName in interface INamed
      Returns:
      the use name if available, or the name if not
      See Also:
    • getEffectiveIndex

      @Nullable default Integer getEffectiveIndex()
      Description copied from interface: INamed
      Get 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 not null, and fall back to the index value provided by INamed.getIndex() otherwise.

      Specified by:
      getEffectiveIndex in interface INamed
      Returns:
      the index value if available, or null otherwise
    • getEffectiveDefaultValue

      @Nullable default Object getEffectiveDefaultValue()
      The resolved default value, which allows an instance to override a definition's default value.
      Specified by:
      getEffectiveDefaultValue in interface IDefaultable
      Returns:
      the default value or null if not defined on either the instance or definition