Class AbstractNamedInstance<PARENT extends IContainer>
- Type Parameters:
PARENT- the Java type of the parent container
- All Implemented Interfaces:
IAttributable,IDefaultable,IDescribable,IInstance,IJsonNamed,IModelElement,IModelElementVisitable,INamed,INamedInstance,INamedModelElement
- Direct Known Subclasses:
AbstractFlagInstance,AbstractNamedModelInstance
INamedInstance providing qualified name
management.
This class lazily computes and caches both the instance's effective qualified name and its referenced definition qualified name.
-
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNamedInstance(PARENT parent, AbstractGlobalDefinition.NameInitializer initializer) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal IEnhancedQNamegetQName()Get the unique XML qualified name for this model element.final IEnhancedQNameThis represents the qualified name of a referenced definition.Methods inherited from class dev.metaschema.core.model.AbstractInstance
getParentContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getEffectiveDescription, getEffectiveFormalName, 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
getEffectiveIndex, getEffectiveName, getIndex, getName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedInstance
getDefinition, isInlineDefinitionMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonName
-
Constructor Details
-
AbstractNamedInstance
protected AbstractNamedInstance(@NonNull PARENT parent, @NonNull AbstractGlobalDefinition.NameInitializer initializer) Construct a new instance.- Parameters:
parent- the parent containing the instanceinitializer- used to generate the instance qualified name
-
-
Method Details
-
getQName
Description copied from interface:INamedGet 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.
-
getReferencedDefinitionQName
Description copied from interface:INamedInstanceThis represents the qualified name of a referenced definition.- Specified by:
getReferencedDefinitionQNamein interfaceINamedInstance- Returns:
- the qualified name
- See Also:
-