2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.sal.binding.model.api.type.builder;
10 import org.opendaylight.yangtools.sal.binding.model.api.AccessModifier;
11 import org.opendaylight.yangtools.sal.binding.model.api.Type;
16 public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
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}
26 * Package Name of Annotation Type
28 * Name of Annotation Type
29 * @return <code>new</code> instance of Annotation Type Builder.
31 AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
34 * Returns the name of property.
36 * @return the name of property.
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}
46 * Return Type of property.
48 T setReturnType(final Type returnType);
50 AccessModifier getAccessModifier();
53 * Sets the access modifier of property.
56 * Access Modifier value.
58 T setAccessModifier(final AccessModifier modifier);
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.
68 T setComment(final String comment);
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.
79 T setFinal(final boolean isFinal);
81 T setStatic(final boolean isStatic);