14505d085f9ec9cb3fa5c4b3141dc17bdad2f726
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / api / BindingCodecTreeFactory.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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.dom.codec.api;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
12 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
13
14 public interface BindingCodecTreeFactory {
15
16     /**
17      * Creates Binding Codec Tree for specified Binding runtime context.
18      *
19      * @param context
20      *            Binding Runtime Context for which Binding codecs should be
21      *            instantiated.
22      * @return Binding Codec Tree for specified Binding runtime context.
23      */
24     BindingCodecTree create(BindingRuntimeContext context);
25
26     /**
27      * Creates Binding Codec Tree for specified Binding runtime context.
28      *
29      * @param context
30      *            Binding Runtime Context for which Binding codecs should be
31      *            instantiated.
32      * @param bindingClasses
33      *            Binding Runtime Context will be constructed using bindings
34      *            which contains specified classes, in order to support
35      *            deserialization in multi-classloader environment.
36      * @return Binding Codec Tree for specified Binding runtime context.
37      */
38     @Beta
39    BindingCodecTree create(SchemaContext context, Class<?>... bindingClasses);
40
41 }