2 * Copyright (c) 2015 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.yangtools.yang.data.api.schema.stream;
10 import com.google.common.collect.ForwardingObject;
11 import java.io.IOException;
12 import java.util.Collection;
13 import javax.xml.transform.dom.DOMSource;
14 import org.eclipse.jdt.annotation.Nullable;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
17 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
19 public abstract class ForwardingNormalizedNodeStreamWriter extends ForwardingObject
20 implements NormalizedNodeStreamWriter {
22 protected abstract NormalizedNodeStreamWriter delegate();
25 public <T extends Extension> @Nullable T extension(final Class<T> type) {
26 return delegate().extension(type);
30 public Collection<? extends Extension> supportedExtensions() {
31 return delegate().supportedExtensions();
35 public void startLeafNode(final NodeIdentifier name) throws IOException {
36 delegate().startLeafNode(name);
40 public void startLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException {
41 delegate().startLeafSet(name, childSizeHint);
45 public void startOrderedLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException {
46 delegate().startOrderedLeafSet(name, childSizeHint);
50 public void startLeafSetEntryNode(final NodeWithValue<?> name) throws IOException {
51 delegate().startLeafSetEntryNode(name);
55 public void startContainerNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
56 delegate().startContainerNode(name, childSizeHint);
60 public void startUnkeyedList(final NodeIdentifier name, final int childSizeHint) throws IOException {
61 delegate().startUnkeyedList(name, childSizeHint);
65 public void startUnkeyedListItem(final NodeIdentifier name, final int childSizeHint) throws IOException {
66 delegate().startUnkeyedListItem(name, childSizeHint);
70 public void startMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
71 delegate().startMapNode(name, childSizeHint);
75 public void startMapEntryNode(final NodeIdentifierWithPredicates identifier, final int childSizeHint)
77 delegate().startMapEntryNode(identifier, childSizeHint);
81 public void startOrderedMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
82 delegate().startOrderedMapNode(name, childSizeHint);
86 public void startChoiceNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
87 delegate().startChoiceNode(name, childSizeHint);
91 public boolean startAnyxmlNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
92 return delegate().startAnyxmlNode(name, objectModel);
96 public boolean startAnydataNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
97 return delegate().startAnydataNode(name, objectModel);
101 public void endNode() throws IOException {
102 delegate().endNode();
106 public void scalarValue(final Object value) throws IOException {
107 delegate().scalarValue(value);
111 public void domSourceValue(final DOMSource value) throws IOException {
112 delegate().domSourceValue(value);
116 public void close() throws IOException {
121 public void flush() throws IOException {