Interface INamed

All Known Subinterfaces:
IAssembly, IAssemblyDefinition, IAssemblyInstance, IAssemblyInstanceAbsolute, IAssemblyInstanceGrouped, IBindingDefinitionModel, IBindingDefinitionModelAssembly, IBoundDefinition, IBoundDefinitionFlag, IBoundDefinitionModel<ITEM>, IBoundDefinitionModelAssembly, IBoundDefinitionModelComplex, IBoundDefinitionModelField<ITEM>, IBoundDefinitionModelFieldComplex, IBoundInstanceFlag, IBoundInstanceModelAssembly, IBoundInstanceModelField<ITEM>, IBoundInstanceModelFieldComplex, IBoundInstanceModelFieldScalar, IBoundInstanceModelGroupedAssembly, IBoundInstanceModelGroupedField, IBoundInstanceModelGroupedNamed, IBoundInstanceModelNamed<ITEM>, IDefinition, IFeatureContainerFlag<FI>, IFeatureDefinitionInstanceInlined<DEFINITION,INSTANCE>, IFeatureDefinitionReferenceInstance<DEFINITION,INSTANCE>, IField, IFieldDefinition, IFieldInstance, IFieldInstanceAbsolute, IFieldInstanceGrouped, IFlag, IFlagDefinition, IFlagInstance, IModelDefinition, INamedInstance, INamedModelElement, INamedModelInstance, INamedModelInstanceAbsolute, INamedModelInstanceGrouped, IValuedDefinition, IValuedInstance
All Known Implementing Classes:
AbstractAssemblyInstance, AbstractFieldInstance, AbstractFlagInstance, AbstractGlobalAssemblyDefinition, AbstractGlobalDefinition, AbstractGlobalFieldDefinition, AbstractGlobalFlagDefinition, AbstractInlineAssemblyDefinition, AbstractInlineFieldDefinition, AbstractInlineFlagDefinition, AbstractNamedInstance, AbstractNamedModelInstance

public interface INamed
Represents a model element that has a name and associated naming properties.

This interface provides methods for accessing the name, use name, qualified name, and index values used for XML and binary representations of model elements.

  • Method Summary

    Modifier and Type
    Method
    Description
    default Integer
    Get the index value to use for binary naming based on the provided index values.
    default String
    Get the name to use based on the provided names.
    default Integer
    Retrieve the index value to use for binary naming.
    Retrieve the name of the model element.
    Get the unique XML qualified name for this model element.
    default Integer
    Retrieve the index value to use for binary naming, instead of the name.
    default String
    Retrieve the name to use for the model element, instead of the name.
  • Method Details

    • getName

      @NonNull String getName()
      Retrieve the name of the model element.
      Returns:
      the name
    • getUseName

      @Nullable default String getUseName()
      Retrieve the name to use for the model element, instead of the name.
      Returns:
      the use name or null if no use name is defined
    • getEffectiveName

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

      @NonNull IEnhancedQName getQName()
      Get the unique XML qualified name for this model element.

      The qualified name is considered to be unique relative to all sibling elements. For a flag, this name will be unique among all flag instances on the same field or assembly definition. For a field or assembly, this name will be unique among all sibling field or assembly instances on the same assembly definition.

      Multiple calls to this method are expected to produce the same, deterministic return value.

      If the namespace is not specified, then the resulting QName will have the namespace XMLConstants.NULL_NS_URI.

      This implementation may be overridden by implementation that cache the QName or provide for a more efficient method for QName creation.

      Returns:
      the XML qualified name, or null if there isn't one
    • getIndex

      @Nullable default Integer getIndex()
      Retrieve the index value to use for binary naming.
      Returns:
      the name index or null if no name index is defined
    • getUseIndex

      @Nullable default Integer getUseIndex()
      Retrieve the index value to use for binary naming, instead of the name.
      Returns:
      the use name index or null if no use name index is defined
    • getEffectiveIndex

      @Nullable default Integer getEffectiveIndex()
      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 getUseIndex() if the call result is not null, and fall back to the index value provided by getIndex() otherwise.

      Returns:
      the index value if available, or null otherwise