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