001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008import edu.umd.cs.findbugs.annotations.NonNull;
009
010/**
011 * Represents a flag definition in a Metaschema module.
012 * <p>
013 * A flag is a simple named data value that can be associated with a field or
014 * assembly. Flag definitions define the data type and constraints for flag
015 * values.
016 */
017public interface IFlagDefinition extends IValuedDefinition, IFlag {
018  @Override
019  IFlagInstance getInlineInstance();
020
021  /**
022   * A visitor callback.
023   *
024   * @param <CONTEXT>
025   *          the type of the context parameter
026   * @param <RESULT>
027   *          the type of the visitor result
028   * @param visitor
029   *          the calling visitor
030   * @param context
031   *          a parameter used to pass contextual information between visitors
032   * @return the visitor result
033   */
034  @Override
035  default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) {
036    return visitor.visitFlagDefinition(this, context);
037  }
038}