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