@@ -393,11 +393,41 @@ void buildAtInjectModule(Append writer) {
393
393
writer .append (Constants .AT_GENERATED ).eol ();
394
394
writer .append ("@InjectModule(" );
395
395
boolean leadingComma = false ;
396
- if (!provides .isEmpty ()) {
396
+ List <String > regularProvides = new ArrayList <>();
397
+ List <String > genericProvides = new ArrayList <>();
398
+
399
+ for (var type : provides ) {
400
+ if (type .contains ("<" )) {
401
+ genericProvides .add (type );
402
+ } else {
403
+ regularProvides .add (type );
404
+ }
405
+ }
406
+
407
+ if (!regularProvides .isEmpty ()) {
408
+ attributeClasses (false , writer , "provides" , provides );
409
+ leadingComma = true ;
410
+ }
411
+ if (!genericProvides .isEmpty ()) {
397
412
attributeString (false , writer , "providesString" , provides );
398
413
leadingComma = true ;
399
414
}
400
- if (!requires .isEmpty ()) {
415
+
416
+ List <String > regularRequires = new ArrayList <>();
417
+ List <String > genericRequires = new ArrayList <>();
418
+
419
+ for (var type : requires ) {
420
+ if (type .contains ("<" )) {
421
+ genericRequires .add (type );
422
+ } else {
423
+ regularRequires .add (type );
424
+ }
425
+ }
426
+ if (!regularRequires .isEmpty ()) {
427
+ attributeClasses (leadingComma , writer , "requires" , regularRequires );
428
+ leadingComma = true ;
429
+ }
430
+ if (!genericRequires .isEmpty ()) {
401
431
attributeString (leadingComma , writer , "requiresString" , requires );
402
432
leadingComma = true ;
403
433
}
@@ -430,7 +460,7 @@ private void attributeString(
430
460
writer .append ("}" );
431
461
}
432
462
433
- private void attributeClasses (boolean leadingComma , Append writer , String prefix , Set <String > classNames ) {
463
+ private void attributeClasses (boolean leadingComma , Append writer , String prefix , Collection <String > classNames ) {
434
464
if (leadingComma ) {
435
465
writer .append (", " );
436
466
}
0 commit comments