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