2 * Copyright (c) 2013 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.mdsal.binding.model.api.type.builder;
10 import java.util.List;
11 import org.opendaylight.mdsal.binding.model.api.AnnotationType;
12 import org.opendaylight.mdsal.binding.model.api.Type;
13 import org.opendaylight.yangtools.concepts.Builder;
16 * Annotation Type Builder Interface serves for creation and instantiation of
17 * immutable copy of Annotation Type. The Annotation Type Builder extends from
18 * {@link Type} interface. The Annotation Type contains set of methods which are
19 * capable to provide information about other Annotation Types and Annotation
24 public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
26 * The method creates new AnnotationTypeBuilder containing specified package
27 * name an annotation name. <br>
28 * Neither the package name or annotation name can contain <code>null</code>
29 * references. In case that any of parameters contains <code>null</code> the
30 * method SHOULD thrown {@link IllegalArgumentException}
32 * @param packageName Package Name of Annotation Type
33 * @param name Name of Annotation Type
34 * @return <code>new</code> instance of Annotation Type Builder.
36 AnnotationTypeBuilder addAnnotation(String packageName, String name);
39 * Adds the parameter into List of parameters for Annotation Type. <br>
40 * If there is already stored parameter with the same name as the new
41 * parameter, the value of the old one will be simply overwritten by the
42 * newer parameter. <br>
43 * Neither the param name or value can contain <code>null</code> references.
44 * In case that any of parameters contains <code>null</code> the method
45 * SHOULD thrown {@link IllegalArgumentException}
47 * @param paramName Parameter Name
48 * @param value Parameter Value
49 * @return <code>true</code> if the parameter has been successfully assigned for Annotation Type
51 boolean addParameter(String paramName, String value);
54 * Adds the parameter with specified List of parameter values into List of
55 * parameters for Annotation Type. <br>
56 * If there is already stored parameter with the same name as the new
57 * parameter, the value of the old one will be simply overwritten by the
58 * newer parameter. <br>
59 * Neither the param name or value can contain <code>null</code> references.
60 * In case that any of parameters contains <code>null</code> the method
61 * SHOULD thrown {@link IllegalArgumentException}
63 * @param paramName Parameter Name
64 * @param values List of Values bounded to Parameter Name
65 * @return <code>true</code> if the parameter has been successfully assigned for Annotation Type
67 boolean addParameters(String paramName, List<String> values);
70 * Returns <code>new</code> <i>immutable</i> instance of Annotation Type
71 * with values assigned in current instance of Annotation Type Builder. <br>
72 * The return Annotation Type instance is immutable thus no additional
73 * modification to Annotation Type Builder will have an impact to
74 * instantiated Annotation Type. <br>
75 * For this purpose call this method after all additions are complete.
77 * @return <code>new</code> <i>immutable</i> instance of Annotation Type.
80 AnnotationType build();