Use E$$ to capture augmentation type
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / main / java / org / opendaylight / mdsal / binding / java / api / generator / AbstractBuilderTemplate.xtend
index 198f02cf8ad2b8381a6bde11075ec30df6c12634..e596643ace5ee70ef5dc34c8de99948d4634d3bb 100644 (file)
@@ -126,10 +126,10 @@ abstract class AbstractBuilderTemplate extends BaseTemplate {
         «ENDIF»
         «IF augmentType !== null»
 
-            @SuppressWarnings("unchecked")
+            @«SuppressWarnings.importedName»({ "unchecked", "checkstyle:methodTypeParameterName"})
             «IF addOverride»@«Override.importedName»«ENDIF»
-            public <E extends «augmentType.importedName»> E «AUGMENTABLE_AUGMENTATION_NAME»(«Class.importedName»<E> augmentationType) {
-                return (E) «AUGMENTATION_FIELD».get(«CodeHelpers.importedName».nonNullValue(augmentationType, "augmentationType"));
+            public <E$$ extends «augmentType.importedName»> E$$ «AUGMENTABLE_AUGMENTATION_NAME»(«Class.importedName»<E$$> augmentationType) {
+                return (E$$) «AUGMENTATION_FIELD».get(«CodeHelpers.importedName».nonNullValue(augmentationType, "augmentationType"));
             }
         «ENDIF»
     '''