2 * Copyright (c) 2018 Pantheon Technologies, 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.binding;
11 * A choice of child nodes within a parent container. This marker interface allows binding interfaces generated for
12 * {@code choice} statements to their defining container, without implying {@link DataObject} and {@link ChildOf}
16 * This marker interface is also inherited by interfaces generated for {@code case} statements, similarly marking those
17 * interfaces as usable within scope when the statement which defined the {@code choice} statement. This allows us to
18 * bind {@code grouping}s to their {@code uses} references within an (implicit or explicit) {@code case}, effectively
19 * forming an addressing path from {@link DataRoot} or a {@link DataContainer}. Given the following generated code:
21 * interface Grouping extends DataObject;
22 * interface GroupingChild extends ChildOf<Grouping>;
24 * interface Parent extends DataContainer;
25 * interface Choice implements ChoiceIn<Parent>;
26 * interface Case extends Choice, Grouping;
28 * we can safely make the inference of {@code GroupingChild -> childOf -> Case -> choiceIn -> Parent}.
30 * @param <P> Parent container
31 * @author Robert Varga
33 public non-sealed interface ChoiceIn<P> extends DataContainer {