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 IFieldInstanceAbsolute extends IFieldInstance, INamedModelInstanceAbsolute {
11  
12    @Override
13    default boolean isEffectiveValueWrappedInXml() {
14      return isInXmlWrapped() || !getDefinition().getJavaTypeAdapter().isUnrappedValueAllowedInXml();
15    }
16  
17    /**
18     * A visitor callback.
19     *
20     * @param <CONTEXT>
21     *          the type of the context parameter
22     * @param <RESULT>
23     *          the type of the visitor result
24     * @param visitor
25     *          the calling visitor
26     * @param context
27     *          a parameter used to pass contextual information between visitors
28     * @return the visitor result
29     */
30    @Override
31    default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) {
32      return visitor.visitFieldInstance(this, context);
33    }
34  }