Interface IFlagInstance

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

public interface IFlagInstance extends IFlag, IValuedInstance, IInstanceAbsolute
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.

  • Field Details

    • DEFAULT_FLAG_REQUIRED

      static final boolean DEFAULT_FLAG_REQUIRED
      The 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:
      getParentContainer in interface IInstance
      Returns:
      the parent model definition
    • getDefinition

      IFlagDefinition getDefinition()
      Retrieves the flag definition referenced by this instance.
      Specified by:
      getDefinition in interface INamedInstance
      Specified by:
      getDefinition in interface IValuedInstance
      Returns:
      the flag definition
    • getContainingDefinition

      default IModelDefinition getContainingDefinition()
      Description copied from interface: IInstance
      Retrieve the Metaschema module definition on which the instance was declared.
      Specified by:
      getContainingDefinition in interface IInstance
      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:
      true if a value is required, or false otherwise
      See Also:
    • accept

      default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT,RESULT> visitor, CONTEXT context)
      A visitor callback.
      Specified by:
      accept in interface IModelElementVisitable
      Type Parameters:
      CONTEXT - the type of the context parameter
      RESULT - the type of the visitor result
      Parameters:
      visitor - the calling visitor
      context - a parameter used to pass contextual information between visitors
      Returns:
      the visitor result