Binding v2 DOM Codec - generator - API
[mdsal.git] / binding2 / mdsal-binding2-dom-codec / src / main / java / org / opendaylight / mdsal / binding / javav2 / dom / codec / generator / api / TreeNodeSerializerGenerator.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 package org.opendaylight.mdsal.binding.javav2.dom.codec.generator.api;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.binding.javav2.generator.impl.util.BindingRuntimeContext;
12 import org.opendaylight.mdsal.binding.javav2.spec.runtime.TreeNodeSerializerImplementation;
13
14 /**
15  * Public interface exposed from generator implementation.
16  */
17 @Beta
18 public interface TreeNodeSerializerGenerator {
19
20     /**
21      * Get a serializer for a particular type.
22      *
23      * @param type - class of type
24      * @return serializer instance
25      */
26     TreeNodeSerializerImplementation getSerializer(Class<?> type);
27
28     /**
29      * Notify the generator that the runtime context has been updated.
30      *
31      * @param runtime - new runtime context
32      */
33     void onBindingRuntimeContextUpdated(BindingRuntimeContext runtime);
34 }