import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.mdsal.binding.runtime.api.ListRuntimeType;
import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.Item;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode;
-sealed class ListNodeCodecContext<D extends DataObject> extends DataObjectCodecContext<D, ListRuntimeType>
- permits KeyedListNodeCodecContext {
- ListNodeCodecContext(final DataContainerCodecPrototype<ListRuntimeType> prototype) {
+sealed class ListCodecContext<D extends DataObject> extends DataObjectCodecContext<D, ListRuntimeType>
+ permits MapCodecContext {
+ ListCodecContext(final Class<D> cls, final ListRuntimeType list, final CodecContextFactory factory) {
+ this(new ListCodecPrototype(Item.of(cls), list, factory));
+ }
+
+ ListCodecContext(final ListCodecPrototype prototype) {
super(prototype);
}
- ListNodeCodecContext(final DataContainerCodecPrototype<ListRuntimeType> prototype,
- final Method keyMethod) {
+ ListCodecContext(final ListCodecPrototype prototype, final Method keyMethod) {
super(prototype, keyMethod);
}