Comment to binding-generator source code (partially) + bug fixing
[yangtools.git] / code-generator / 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.
25      * <br>
26      * The method will return List of All Generated Types that could be
27      * Generated from Schema Context.
28      *
29      *
30      * @param context Schema Context
31      * @return List of Generated Types
32      *
33      * @see SchemaContext
34      */
35     public 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
40      * otherwise the there is no guarantee that result List of Generated
41      * Types will contain correct Generated Types.
42      *
43      * @param context Schema Context
44      * @param modules Sub Set of Modules
45      * @return List of Generated Types restricted by sub set of Modules
46      *
47      * @see Module
48      * @see SchemaContext
49      *
50      */
51     public List<Type> generateTypes(final SchemaContext context,
52                                     final Set<Module> modules);
53 }