Bug 4798: Can not define a list as a subordinate
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / yangtools / binding / data / codec / impl / ForwardingBindingStreamEventWriter.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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.binding.data.codec.impl;
9
10 import java.io.IOException;
11 import org.opendaylight.yangtools.yang.binding.Augmentation;
12 import org.opendaylight.yangtools.yang.binding.BindingStreamEventWriter;
13 import org.opendaylight.yangtools.yang.binding.DataContainer;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.Identifiable;
16 import org.opendaylight.yangtools.yang.binding.Identifier;
17
18 //FIXME: Consider moving this to yang.binding.util.* in Be
19 abstract class ForwardingBindingStreamEventWriter implements BindingStreamEventWriter {
20
21     protected abstract BindingStreamEventWriter delegate();
22
23     @Override
24     public void leafNode(final String localName, final Object value) throws IOException, IllegalArgumentException {
25         delegate().leafNode(localName, value);
26     }
27
28
29     @Override
30     public void startLeafSet(final String localName, final int childSizeHint) throws IOException, IllegalArgumentException {
31         delegate().startLeafSet(localName, childSizeHint);
32     }
33
34     @Override
35     public void startOrderedLeafSet(final String localName, final int childSizeHint) throws IOException, IllegalArgumentException {
36         delegate().startOrderedLeafSet(localName, childSizeHint);
37     }
38
39     @Override
40     public void leafSetEntryNode(final Object value) throws IOException, IllegalArgumentException {
41         delegate().leafSetEntryNode(value);
42     }
43
44
45     @Override
46     public void startContainerNode(final Class<? extends DataObject> container, final int childSizeHint) throws IOException,
47             IllegalArgumentException {
48         delegate().startContainerNode(container, childSizeHint);
49     }
50
51
52     @Override
53     public void startUnkeyedList(final Class<? extends DataObject> localName, final int childSizeHint) throws IOException,
54             IllegalArgumentException {
55         delegate().startUnkeyedList(localName, childSizeHint);
56     }
57
58
59     @Override
60     public void startUnkeyedListItem(final int childSizeHint) throws IOException, IllegalStateException {
61         delegate().startUnkeyedListItem(childSizeHint);
62     }
63
64
65     @Override
66     public <T extends DataObject & Identifiable<?>> void startMapNode(final Class<T> mapEntryType, final int childSizeHint)
67             throws IOException, IllegalArgumentException {
68         delegate().startMapNode(mapEntryType, childSizeHint);
69     }
70
71
72     @Override
73     public <T extends DataObject & Identifiable<?>> void startOrderedMapNode(final Class<T> mapEntryType, final int childSizeHint)
74             throws IOException, IllegalArgumentException {
75         delegate().startOrderedMapNode(mapEntryType, childSizeHint);
76     }
77
78
79     @Override
80     public void startMapEntryNode(final Identifier<?> keyValues, final int childSizeHint) throws IOException,
81             IllegalArgumentException {
82         delegate().startMapEntryNode(keyValues, childSizeHint);
83     }
84
85
86     @Override
87     public void startChoiceNode(final Class<? extends DataContainer> choice, final int childSizeHint) throws IOException,
88             IllegalArgumentException {
89         delegate().startChoiceNode(choice, childSizeHint);
90     }
91
92
93     @Override
94     public void startCase(final Class<? extends DataObject> caze, final int childSizeHint) throws IOException,
95             IllegalArgumentException {
96         delegate().startCase(caze, childSizeHint);
97     }
98
99
100     @Override
101     public void startAugmentationNode(final Class<? extends Augmentation<?>> augmentationType) throws IOException,
102             IllegalArgumentException {
103         delegate().startAugmentationNode(augmentationType);
104     }
105
106
107     @Override
108     public void anyxmlNode(final String name, final Object value) throws IOException, IllegalArgumentException {
109         delegate().anyxmlNode(name, value);
110     }
111
112
113     @Override
114     public void endNode() throws IOException, IllegalStateException {
115         delegate().endNode();
116     }
117
118
119     @Override
120     public void flush() throws IOException {
121         delegate().flush();
122     }
123
124
125     @Override
126     public void close() throws IOException {
127         delegate().close();
128     }
129 }