2 * Copyright (c) 2023 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.mdsal.binding.dom.codec.impl;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.mdsal.binding.runtime.api.CompositeRuntimeType;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.DataObjectStep;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
19 abstract sealed class DataObjectCodecPrototype<T extends CompositeRuntimeType> extends CommonDataObjectCodecPrototype<T>
20 permits CaseCodecPrototype, ContainerLikeCodecPrototype, ListCodecPrototype,
21 NotificationCodecContext.Prototype {
22 private final @NonNull NodeIdentifier yangArg;
24 DataObjectCodecPrototype(final Class<?> cls, final NodeIdentifier yangArg, final T type,
25 final CodecContextFactory factory) {
26 this(InstanceIdentifier.createStep(cls.asSubclass(DataObject.class)), yangArg, type, factory);
29 DataObjectCodecPrototype(final DataObjectStep<?> bindingArg, final NodeIdentifier yangArg, final T type,
30 final CodecContextFactory factory) {
31 super(bindingArg, type, factory);
32 this.yangArg = requireNonNull(yangArg);
36 final NodeIdentifier yangArg() {