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> {
27 * The method creates new AnnotationTypeBuilder containing specified package
28 * name an annotation name. <br>
29 * Neither the package name or annotation name can contain <code>null</code>
30 * references. In case that any of parameters contains <code>null</code> the
31 * method SHOULD thrown {@link IllegalArgumentException}
34 * Package Name of Annotation Type
36 * Name of Annotation Type
37 * @return <code>new</code> instance of Annotation Type Builder.
39 AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
42 * Adds the parameter into List of parameters for Annotation Type. <br>
43 * If there is already stored parameter with the same name as the new
44 * parameter, the value of the old one will be simply overwritten by the
45 * newer parameter. <br>
46 * Neither the param name or value can contain <code>null</code> references.
47 * In case that any of parameters contains <code>null</code> the method
48 * SHOULD thrown {@link IllegalArgumentException}
54 * @return <code>true</code> if the parameter has been successfully assigned
57 boolean addParameter(final String paramName, String value);
60 * Adds the parameter with specified List of parameter values into List of
61 * parameters for Annotation Type. <br>
62 * If there is already stored parameter with the same name as the new
63 * parameter, the value of the old one will be simply overwritten by the
64 * newer parameter. <br>
65 * Neither the param name or value can contain <code>null</code> references.
66 * In case that any of parameters contains <code>null</code> the method
67 * SHOULD thrown {@link IllegalArgumentException}
72 * List of Values bounded to Parameter Name
73 * @return <code>true</code> if the parameter has been successfully assigned
76 boolean addParameters(final String paramName, List<String> values);
79 * Returns <code>new</code> <i>immutable</i> instance of Annotation Type
80 * with values assigned in current instance of Annotation Type Builder. <br>
81 * The return Annotation Type instance is immutable thus no additional
82 * modification to Annotation Type Builder will have an impact to
83 * instantiated Annotation Type. <br>
84 * For this purpose call this method after all additions are complete.
86 * @return <code>new</code> <i>immutable</i> instance of Annotation Type.
89 AnnotationType build();