2 * Copyright (c) 2014 Cisco Systems, Inc. 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;
18 * Common superclass for {@link DataObjectCodecPrototype} and {@link AugmentationCodecPrototype}.
20 * @param <R> {@link CompositeRuntimeType} type
22 abstract sealed class CommonDataObjectCodecPrototype<R extends CompositeRuntimeType>
23 extends DataContainerPrototype<CommonDataObjectCodecContext<?, R>, R>
24 permits AugmentationCodecPrototype, DataObjectCodecPrototype {
25 private final @NonNull DataObjectStep<?> step;
27 CommonDataObjectCodecPrototype(final DataObjectStep<?> step, final R runtimeType,
28 final CodecContextFactory factory) {
29 super(factory, runtimeType);
30 this.step = requireNonNull(step);
34 final Class<? extends DataObject> javaClass() {
38 final @NonNull DataObjectStep<?> getBindingArg() {