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