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