Merge "Host updates for Topology"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-model-api / src / main / java / org / opendaylight / controller / sal / binding / model / api / GeneratedType.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.controller.sal.binding.model.api;
9
10 import java.util.List;
11
12 /**
13  * Every Java interface has to be specified with:
14  * <ul>
15  * <li><code>package</code> that belongs into</li>
16  * <li><code>interface</code> name (with commentary that <b>SHOULD</b> be
17  * present to proper define interface and base <i>contracts</i> specified for
18  * interface)</li>
19  * <li>Each Generated Type can define list of types that Generated Type
20  * can implement to extend it's definition (i.e. interface extends list of
21  * interfaces or java class implements list of interfaces)</li>
22  * <li>Each Generated Type can contain multiple enclosed definitions of
23  * Generated Types (i.e. interface can contain N enclosed interface
24  * definitions or enclosed classes)</li>
25  * <li><code>enum</code> and <code>constant</code> definitions (i.e. each
26  * constant definition is by default defined as <code>public static final</code>
27  * + type (either primitive or object) and constant name</li>
28  * <li><code>method definitions</code> with specified input parameters (with
29  * types) and return values</li>
30  * </ul>
31  * 
32  * By the definition of the interface constant, enum,
33  * enclosed types and method definitions MUST
34  * be public, so there is no need to specify the scope of visibility.
35  */
36 public interface GeneratedType extends Type {
37
38     /**
39      * Returns the parent type if Generated Type is defined as enclosing type,
40      * otherwise returns <code>null</code>
41      *
42      * @return the parent type if Generated Type is defined as enclosing type,
43      * otherwise returns <code>null</code>
44      */
45     public Type getParentType();
46
47     /**
48      * Returns comment string associated with Generated Type.
49      *
50      * @return comment string associated with Generated Type.
51      */
52     public String getComment();
53
54     /**
55      * Returns List of annotation definitions associated with generated type.
56      *
57      * @return List of annotation definitions associated with generated type.
58      */
59     public List<AnnotationType> getAnnotations();
60
61     /**
62      * Returns <code>true</code> if The Generated Type is defined as abstract.
63      *
64      * @return <code>true</code> if The Generated Type is defined as abstract.
65      */
66     public boolean isAbstract();
67
68     /**
69      * Returns List of Types that Generated Type will implement.
70      *
71      * @return List of Types that Generated Type will implement.
72      */
73     public List<Type> getImplements();
74
75     /**
76      * Returns List of enclosing Generated Types.
77      *
78      * @return List of enclosing Generated Types.
79      */
80     public List<GeneratedType> getEnclosedTypes();
81
82     /**
83      * Returns List of all Enumerator definitions associated with Generated
84      * Type.
85      * 
86      * @return List of all Enumerator definitions associated with Generated
87      * Type.
88      */
89     public List<Enumeration> getEnumerations();
90
91     /**
92      * Returns List of Constant definitions associated with Generated Type.
93      *
94      * @return List of Constant definitions associated with Generated Type.
95      */
96     public List<Constant> getConstantDefinitions();
97
98     /**
99      * Returns List of Method Definitions associated with Generated Type.
100      * 
101      * @return List of Method Definitions associated with Generated Type.
102      */
103     public List<MethodSignature> getMethodDefinitions();
104 }