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 public interface IFieldInstanceGrouped extends INamedModelInstanceGrouped, IFieldInstance {
11
12 /**
13 * Determines if the field is configured to have a wrapper in XML.
14 *
15 * @return {@code true} if an XML wrapper is required, or {@code false}
16 * otherwise
17 */
18 @Override
19 default boolean isInXmlWrapped() {
20 // must always be wrapped
21 return true;
22 }
23
24 @Override
25 default boolean isEffectiveValueWrappedInXml() {
26 // must always be wrapped
27 return true;
28 }
29
30 /**
31 * A visitor callback.
32 *
33 * @param <CONTEXT>
34 * the type of the context parameter
35 * @param <RESULT>
36 * the type of the visitor result
37 * @param visitor
38 * the calling visitor
39 * @param context
40 * a parameter used to pass contextual information between visitors
41 * @return the visitor result
42 */
43 @Override
44 default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) {
45 return visitor.visitFieldInstance(this, context);
46 }
47 }