1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package gov.nist.secauto.metaschema.core.model;
7
8 import edu.umd.cs.findbugs.annotations.NonNull;
9
10 /**
11 * Represents a flag definition in a Metaschema module.
12 * <p>
13 * A flag is a simple named data value that can be associated with a field or
14 * assembly. Flag definitions define the data type and constraints for flag
15 * values.
16 */
17 public interface IFlagDefinition extends IValuedDefinition, IFlag {
18 @Override
19 IFlagInstance getInlineInstance();
20
21 /**
22 * A visitor callback.
23 *
24 * @param <CONTEXT>
25 * the type of the context parameter
26 * @param <RESULT>
27 * the type of the visitor result
28 * @param visitor
29 * the calling visitor
30 * @param context
31 * a parameter used to pass contextual information between visitors
32 * @return the visitor result
33 */
34 @Override
35 default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) {
36 return visitor.visitFlagDefinition(this, context);
37 }
38 }