- All Superinterfaces:
IAttributable,IDefaultable,IDescribable,IFlag,IInstance,IInstanceAbsolute,IJsonNamed,IModelElement,IModelElementVisitable,INamed,INamedInstance,INamedModelElement,IValued,IValuedInstance
- All Known Subinterfaces:
IBoundInstanceFlag
- All Known Implementing Classes:
AbstractFlagInstance,AbstractInlineFlagDefinition
Represents a flag instance within a field or assembly definition.
A flag instance references a flag definition and specifies how that flag is used within its containing definition, including whether the flag is required.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.metaschema.core.model.IAttributable
IAttributable.Key -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default value for whether a flag is required.Fields inherited from interface dev.metaschema.core.model.IAttributable
DEFAULT_PROPERY_NAMESPACE -
Method Summary
Modifier and TypeMethodDescriptiondefault <CONTEXT,RESULT>
RESULTaccept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.default IModelDefinitionRetrieve the Metaschema module definition on which the instance was declared.Retrieves the flag definition referenced by this instance.Retrieves the parent container that contains this flag instance.default booleanDetermines if a flag value is required to be provided.Methods 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.IFlag
getModelTypeMethods inherited from interface dev.metaschema.core.model.IInstance
toCoordinatesMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getRemarksMethods inherited from interface dev.metaschema.core.model.INamed
getEffectiveIndex, getEffectiveName, getIndex, getName, getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedInstance
getReferencedDefinitionQName, isInlineDefinitionMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonName
-
Field Details
-
DEFAULT_FLAG_REQUIRED
static final boolean DEFAULT_FLAG_REQUIREDThe default value for whether a flag is required.- See Also:
-
-
Method Details
-
getParentContainer
IModelDefinition getParentContainer()Retrieves the parent container that contains this flag instance.- Specified by:
getParentContainerin interfaceIInstance- Returns:
- the parent model definition
-
getDefinition
IFlagDefinition getDefinition()Retrieves the flag definition referenced by this instance.- Specified by:
getDefinitionin interfaceINamedInstance- Specified by:
getDefinitionin interfaceIValuedInstance- Returns:
- the flag definition
-
getContainingDefinition
Description copied from interface:IInstanceRetrieve the Metaschema module definition on which the instance was declared.- Specified by:
getContainingDefinitionin interfaceIInstance- Returns:
- the Metaschema module definition on which the instance was declared
-
isRequired
default boolean isRequired()Determines if a flag value is required to be provided.- Returns:
trueif a value is required, orfalseotherwise- See Also:
-
accept
default <CONTEXT,RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.- Specified by:
acceptin interfaceIModelElementVisitable- Type Parameters:
CONTEXT- the type of the context parameterRESULT- the type of the visitor result- Parameters:
visitor- the calling visitorcontext- a parameter used to pass contextual information between visitors- Returns:
- the visitor result
-