Cleaned up Java Binding code from YANG Tools
[mdsal.git] / binding / mdsal-binding-generator-api / src / main / java / org / opendaylight / yangtools / sal / binding / generator / api / BindingGenerator.java
1 /*
2  * Copyright (c) 2013 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.sal.binding.generator.api;
9
10 import java.util.List;
11 import java.util.Set;
12
13 import org.opendaylight.yangtools.sal.binding.model.api.Type;
14 import org.opendaylight.yangtools.yang.model.api.Module;
15 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
16
17 /**
18  * Transform Schema Context to Generated types.
19  * 
20  */
21 public interface BindingGenerator {
22
23     /**
24      * Generate Types from whole Schema Context. <br>
25      * The method will return List of All Generated Types that could be
26      * Generated from Schema Context.
27      * 
28      * 
29      * @param context
30      *            Schema Context
31      * @return List of Generated Types
32      * 
33      * @see SchemaContext
34      */
35     List<Type> generateTypes(final SchemaContext context);
36
37     /**
38      * Generate Types from Schema Context restricted by sub set of specified
39      * Modules. The Schema Context MUST contain all of the sub modules otherwise
40      * the there is no guarantee that result List of Generated Types will
41      * contain correct Generated Types.
42      * 
43      * @param context
44      *            Schema Context
45      * @param modules
46      *            Sub Set of Modules
47      * @return List of Generated Types restricted by sub set of Modules
48      * 
49      * @see Module
50      * @see SchemaContext
51      * 
52      */
53     List<Type> generateTypes(final SchemaContext context, final Set<Module> modules);
54 }