/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.mdsal.binding.dom.codec.impl;
import java.io.IOException;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingStreamEventWriter;
import org.opendaylight.mdsal.binding.dom.codec.impl.LeafNodeCodecContext.OfTypeObject;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.TypeObject;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Serializer of Binding objects to Normalized Node which uses {@link DataObjectNormalizedNodeCache} to
* cache already serialized values.
*
*
* This serializer implements {@link BindingStreamEventWriter} along with {@link BindingSerializer}.
*
*
* {@link BindingSerializer} interface is used by generated implementations of {@link DataObjectSerializer} to provide
* Binding object for inspection and to prevent streaming of already serialized object.
*/
final class CachingNormalizedNodeSerializer extends ForwardingBindingStreamEventWriter
implements BindingSerializer