2 * Copyright (c) 2017 Pantheon Technologies 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.javav2.dom.codec.impl.serializer;
10 import com.google.common.annotations.Beta;
11 import java.io.IOException;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.IdentifiableItem;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.Item;
14 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
15 import org.opendaylight.mdsal.binding.javav2.spec.runtime.BindingStreamEventWriter;
16 import org.opendaylight.mdsal.binding.javav2.spec.structural.Augmentation;
17 import org.opendaylight.yangtools.concepts.Identifiable;
20 * Forwarding of event stream writer of Binding v2 representation.
23 abstract class ForwardingBindingStreamEventWriter implements BindingStreamEventWriter {
25 protected abstract BindingStreamEventWriter delegate();
28 public void leafNode(final String localName, final Object value) throws IOException {
29 delegate().leafNode(localName, value);
33 public void startLeafSet(final String localName, final int childSizeHint) throws IOException {
34 delegate().startLeafSet(localName, childSizeHint);
38 public void startOrderedLeafSet(final String localName, final int childSizeHint) throws IOException {
39 delegate().startOrderedLeafSet(localName, childSizeHint);
43 public void leafSetEntryNode(final Object value) throws IOException {
44 delegate().leafSetEntryNode(value);
48 public void startContainerNode(final Class<? extends TreeNode> container, final int childSizeHint)
50 delegate().startContainerNode(container, childSizeHint);
54 public void startUnkeyedList(final Class<? extends TreeNode> localName, final int childSizeHint)
56 delegate().startUnkeyedList(localName, childSizeHint);
60 public void startUnkeyedListItem(final int childSizeHint) throws IOException {
61 delegate().startUnkeyedListItem(childSizeHint);
65 public <T extends TreeNode & Identifiable<?>> void startMapNode(final Class<T> mapEntryType,
66 final int childSizeHint) throws IOException {
67 delegate().startMapNode(mapEntryType, childSizeHint);
71 public <T extends TreeNode & Identifiable<?>> void startOrderedMapNode(final Class<T> mapEntryType,
72 final int childSizeHint) throws IOException {
73 delegate().startOrderedMapNode(mapEntryType, childSizeHint);
77 public <I extends TreeNode, T> void startMapEntryNode(final IdentifiableItem<I, T> keyValues,
78 final int childSizeHint) throws IOException {
79 delegate().startMapEntryNode(keyValues, childSizeHint);
83 public <T extends TreeNode> void startChoiceNode(final Item<T> choice, final int childSizeHint) throws IOException {
84 delegate().startChoiceNode(choice, childSizeHint);
88 public void startCase(final Class<? extends TreeNode> caze, final int childSizeHint) throws IOException {
89 delegate().startCase(caze, childSizeHint);
93 public void startAugmentationNode(final Class<? extends Augmentation<?>> augmentationType) throws IOException {
94 delegate().startAugmentationNode(augmentationType);
98 public void anyxmlNode(final String name, final Object value) throws IOException {
99 delegate().anyxmlNode(name, value);
103 public void startAnydataNode(final String name, final Object value) throws IOException {
104 delegate().startAnydataNode(name, value);
108 public void endNode() throws IOException {
109 delegate().endNode();
113 public void flush() throws IOException {
118 public void close() throws IOException {