Document Builder.augmentation() 46/100846/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 27 Apr 2022 15:32:38 +0000 (17:32 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 27 Apr 2022 15:43:35 +0000 (17:43 +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>
binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/BuilderTemplate.xtend

index fe0c37e1c5d54442fc4cf03030aa73e021501be5..79567d51bcbf6a8088bed8b6c7c967e1302955a4 100644 (file)
@@ -514,6 +514,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));