Document Builder.augmentation() 45/101045/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 27 Apr 2022 15:32:38 +0000 (17:32 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 10 May 2022 09:25:41 +0000 (11:25 +0200)
Builder's augmentation() method needs some javadoc to fix linting
warnings.

JIRA: MDSAL-755
Change-Id: I1bc62ea6753411159a9d21eca95eaf40b799d2b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 938a70d61dc8948d65e8c7ca64ffcbf4e6162b68)

binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/BuilderTemplate.xtend

index 2bbe3530e34d2edece58968bfd46e097f21878d4..6e9eba483ff0f7d10148a9913bf330be8d4d4c61 100644 (file)
@@ -534,6 +534,14 @@ class BuilderTemplate extends AbstractBuilderTemplate {
     }
 
     private def generateAugmentation() '''
+        /**
+         * Return the specified augmentation, if it is present in this builder.
+         *
+         * @param <E$$> augmentation type
+         * @param augmentationType augmentation type class
+         * @return Augmentation object from this builder, or {@code null} if not present
+         * @throws «NPE.importedName» if {@code augmentType} is {@code null}
+         */
         @«SUPPRESS_WARNINGS.importedName»({ "unchecked", "checkstyle:methodTypeParameterName"})
         public <E$$ extends «augmentType.importedName»> E$$ «AUGMENTABLE_AUGMENTATION_NAME»(«CLASS.importedName»<E$$> augmentationType) {
             return (E$$) «AUGMENTATION_FIELD».get(«JU_OBJECTS.importedName».requireNonNull(augmentationType));