Introduce odl-bytebuddy
[yangtools.git] / binding / binding-lib / src / main / java / org / opendaylight / yangtools / binding / lib / YangData.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.binding.lib;
9
10 /**
11  * A piece of YANG-modeled data, as defined by <a href="https://www.rfc-editor.org/rfc/rfc8040">RESTCONF</a>
12  * {@code yang-data extension}.
13  *
14  * <p>
15  * This is quite similar to a {@link DataObject}, but it cannot be directly stored in a data store. Its data subtree may
16  * actually have a relationship to a data store subtree -- but that part is dependent on the context in which this
17  * object is used.
18  *
19  * <p>
20  * As per the extension definition, the structure of children is such that there is a single {@code container} which
21  * represents the content. This is variadic and may contain, for example, a modeling indirection through a number of
22  * {@code choice} and {@code case} statements. Unlike a {@link DataObject}, though, this construct is not subject to
23  * {@code augment} statements nor any sort of extensibility.
24  *
25  * <p>
26  * Furthermore {@code rc:yang-data} can only appear as a top-level module contract and therefore the code generation is
27  * limited to a single interface, which only provides the default implementation of {@link #implementedInterface()}
28  * bound to itself.
29  *
30  * @param <T> Generated interface type
31  */
32 public non-sealed interface YangData<T extends YangData<T>> extends BindingObject, DataContainer {
33     @Override
34     Class<T> implementedInterface();
35 }