2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.util;
10 import org.opendaylight.yangtools.yang.common.QName;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
13 import org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack;
16 * An {@link AbstractMixinContextNode} which corresponding to a {@code list} or {@code leaf-list} node. NormalizedNode
17 * representation of these nodes is similar to JSON encoding and therefore we have two {@link DataSchemaContextNode}
18 * levels backed by a single {@link DataSchemaNode}.
20 abstract class AbstractListLikeContextNode<T extends PathArgument> extends AbstractMixinContextNode<T> {
21 AbstractListLikeContextNode(final T identifier, final DataSchemaNode schema) {
22 super(identifier, schema);
26 protected final DataSchemaContextNode<?> enterChild(final QName child, final SchemaInferenceStack stack) {
27 // Stack is already pointing to the corresponding statement, now we are just working with the child
28 return getChild(child);
32 protected final DataSchemaContextNode<?> enterChild(final PathArgument child, final SchemaInferenceStack stack) {
33 return getChild(child);