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
9 package org.opendaylight.mdsal.binding.javav2.spec.runtime;
11 import java.io.IOException;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
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.
19 public interface TreeNodeSerializerImplementation {
22 * Writes stream events for supplied tree node to provided stream.
24 * TreeNodeSerializerRegistry may be used to lookup serializers for other generated classes in order to
25 * support writing their events.
27 void serialize(TreeNodeSerializerRegistry reg, TreeNode obj, BindingStreamEventWriter stream) throws IOException;