Interface AnnotationTypeBuilder
- All Superinterfaces:
org.opendaylight.yangtools.concepts.Identifiable<JavaTypeName>,Type
Annotation Type Builder Interface serves for creation and instantiation of
immutable copy of Annotation Type. The Annotation Type Builder extends from
Type interface. The Annotation Type contains set of methods which are
capable to provide information about other Annotation Types and Annotation
Parameters.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@NonNull AnnotationTypeBuilderaddAnnotation(String packageName, String name) The method creates new AnnotationTypeBuilder containing specified package name an annotation name.booleanaddParameter(String paramName, String value) Adds the parameter into List of parameters for Annotation Type.booleanaddParameters(String paramName, List<String> values) Adds the parameter with specified List of parameter values into List of parameters for Annotation Type.@NonNull AnnotationTypebuild()Returnsnewimmutable instance of Annotation Type with values assigned in current instance of Annotation Type Builder.Methods inherited from interface org.opendaylight.yangtools.concepts.Identifiable
getIdentifierMethods inherited from interface org.opendaylight.mdsal.binding.model.api.Type
getFullyQualifiedName, getName, getPackageName
-
Method Details
-
addAnnotation
The method creates new AnnotationTypeBuilder containing specified package name an annotation name.
Neither the package name or annotation name can containnullreferences. In case that any of parameters containsnullthe method SHOULD thrownIllegalArgumentException- Parameters:
packageName- Package Name of Annotation Typename- Name of Annotation Type- Returns:
newinstance of Annotation Type Builder.
-
addParameter
Adds the parameter into List of parameters for Annotation Type.
If there is already stored parameter with the same name as the new parameter, the value of the old one will be simply overwritten by the newer parameter.
Neither the param name or value can containnullreferences. In case that any of parameters containsnullthe method SHOULD thrownIllegalArgumentException- Parameters:
paramName- Parameter Namevalue- Parameter Value- Returns:
trueif the parameter has been successfully assigned for Annotation Type
-
addParameters
Adds the parameter with specified List of parameter values into List of parameters for Annotation Type.
If there is already stored parameter with the same name as the new parameter, the value of the old one will be simply overwritten by the newer parameter.
Neither the param name or value can containnullreferences. In case that any of parameters containsnullthe method SHOULD thrownIllegalArgumentException- Parameters:
paramName- Parameter Namevalues- List of Values bounded to Parameter Name- Returns:
trueif the parameter has been successfully assigned for Annotation Type
-
build
@NonNull AnnotationType build()Returnsnewimmutable instance of Annotation Type with values assigned in current instance of Annotation Type Builder.
The return Annotation Type instance is immutable thus no additional modification to Annotation Type Builder will have an impact to instantiated Annotation Type.
For this purpose call this method after all additions are complete.- Returns:
newimmutable instance of Annotation Type.
-