Bug 1411: MDSAL Binding2 Generator API Enumeration fix
[mdsal.git] / binding2 / mdsal-binding2-generator-api / src / main / java / org / opendaylight / mdsal / binding2 / model / api / type / builder / TypeMemberBuilder.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.type.builder;
10
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding2.model.api.AccessModifier;
13 import org.opendaylight.mdsal.binding2.model.api.Type;
14
15 /**
16  *
17  */
18 @Beta
19 public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
20     /**
21      * The method creates new AnnotationTypeBuilder containing specified package
22      * name an annotation name. <br>
23      * Neither the package name or annotation name can contain <code>null</code>
24      * references. In case that any of parameters contains <code>null</code> the
25      * method SHOULD thrown {@link IllegalArgumentException}
26      *
27      * @param packageName
28      *            Package Name of Annotation Type
29      * @param name
30      *            Name of Annotation Type
31      * @return <code>new</code> instance of Annotation Type Builder.
32      */
33     AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
34
35     /**
36      * Returns the name of property.
37      *
38      * @return the name of property.
39      */
40     String getName();
41
42     /**
43      * Adds return Type into Builder definition for Generated Property. <br>
44      * The return Type MUST NOT be <code>null</code>, otherwise the method
45      * SHOULD throw {@link IllegalArgumentException}
46      *
47      * @param returnType
48      *            Return Type of property.
49      */
50     T setReturnType(final Type returnType);
51
52     AccessModifier getAccessModifier();
53
54     /**
55      * Sets the access modifier of property.
56      *
57      * @param modifier
58      *            Access Modifier value.
59      */
60     T setAccessModifier(final AccessModifier modifier);
61
62     /**
63      * Adds String definition of comment into Method Signature definition. <br>
64      * The comment String MUST NOT contain anny comment specific chars (i.e.
65      * "/**" or "//") just plain String text description.
66      *
67      * @param comment
68      *            Comment String.
69      */
70     T setComment(final String comment);
71
72     /**
73      * Sets the flag final for method signature. If this is set the method will
74      * be prohibited from overriding. <br>
75      * This setting is irrelevant for methods designated to be defined in
76      * interface definitions because interface can't have final method.
77      *
78      * @param isFinal
79      *            Is Final
80      */
81     T setFinal(final boolean isFinal);
82
83     T setStatic(final boolean isStatic);
84 }