Correct docs declaration
[mdsal.git] / binding2 / mdsal-binding2-spec / src / main / java / org / opendaylight / mdsal / binding / javav2 / spec / runtime / TreeNodeSerializerImplementation.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.mdsal.binding.javav2.spec.runtime;
10
11 import java.io.IOException;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
13
14 /**
15  * Contract for implementations of {@link TreeNodeSerializer}.
16  * The contract is kept between implementation of {@link TreeNodeSerializerRegistry},
17  * which maintains the lookup context required for recursive serialization.
18  */
19 public interface TreeNodeSerializerImplementation {
20
21     /**
22      * Writes stream events for supplied tree node to provided stream.
23      *
24      * TreeNodeSerializerRegistry may be used to lookup serializers for other generated classes in order to
25      * support writing their events.
26      */
27     void serialize(TreeNodeSerializerRegistry reg, TreeNode obj, BindingStreamEventWriter stream) throws IOException;
28 }