Refactor PathArgument to DataObjectStep
[mdsal.git] / binding / yang-binding / src / main / java / org / opendaylight / yangtools / yang / binding / ExactDataObjectStep.java
1 /*
2  * Copyright (c) 2024 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.yang.binding;
9
10 /**
11  * A {@link DataObjectStep} which is exactly specified. Due to how {@link DataObject} and {@link KeyAware} are tied
12  * together, a class generated for a {@code list} is strictly a {@link DataObject}, but its semantics differ.
13  *
14  * <p>
15  * This interface captures two possible outcomes:
16  * <ol>
17  *   <li>this is a plain {@link NodeStep}</li>
18  *   <li>this is a fully-specified {@link KeyStep}</li>
19  * </ol>
20  *
21  * @param <T> DataObject type
22  */
23 public sealed interface ExactDataObjectStep<T extends DataObject> extends DataObjectStep<T>
24     permits KeyStep, NodeStep {
25     // for class hierarchy only
26 }