@@ -456,7 +456,11 @@ private void mapParamDependencies(ModelClass modelClass) {
456
456
private void mapFields () {
457
457
List <Field > fields = new ArrayList <>();
458
458
for (FieldDoc fieldDoc : _classDoc .fields (false )) {
459
- Field mappedField = new Field (fieldDoc .name (), shortName (fieldDoc .type ()), mapVisibility (fieldDoc ), fieldDoc .isStatic ());
459
+ Type type = fieldDoc .type ();
460
+ String typeName = type .asTypeVariable () != null
461
+ ? type .asTypeVariable ().simpleTypeName ()
462
+ : shortName (type );
463
+ Field mappedField = new Field (fieldDoc .name (), typeName , mapVisibility (fieldDoc ), fieldDoc .isStatic ());
460
464
fields .add (mappedField );
461
465
}
462
466
orderVisibility (fields , _fields );
@@ -467,7 +471,11 @@ private void mapConstructors() {
467
471
for (ConstructorDoc consDoc : _classDoc .constructors (false )) {
468
472
List <MethodParameter > params = new ArrayList <>();
469
473
for (Parameter param : consDoc .parameters ()) {
470
- params .add (new MethodParameter (shortName (param .type ()), param .name ()));
474
+ Type paramType = param .type ();
475
+ String paramTypeName = paramType .asTypeVariable () != null
476
+ ? paramType .asTypeVariable ().simpleTypeName ()
477
+ : shortName (param .type ());
478
+ params .add (new MethodParameter (paramTypeName , param .name ()));
471
479
}
472
480
Constructor constructor = new Constructor (consDoc .name (), params , mapVisibility (consDoc ));
473
481
constructors .add (constructor );
@@ -480,11 +488,19 @@ private void mapMethods() {
480
488
for (MethodDoc methodDoc : _classDoc .methods (false )) {
481
489
List <MethodParameter > params = new ArrayList <>();
482
490
for (Parameter param : methodDoc .parameters ()) {
483
- params .add (new MethodParameter (shortName (param .type ()), param .name ()));
491
+ Type paramType = param .type ();
492
+ String paramTypeName = paramType .asTypeVariable () != null
493
+ ? paramType .asTypeVariable ().simpleTypeName ()
494
+ : shortName (param .type ());
495
+ params .add (new MethodParameter (paramTypeName , param .name ()));
484
496
}
497
+ Type returnType = methodDoc .returnType ();
498
+ String returnTypeName = returnType .asTypeVariable () != null
499
+ ? returnType .asTypeVariable ().simpleTypeName ()
500
+ : shortName (returnType );
485
501
Method method = new Method (methodDoc .name (),
486
502
params ,
487
- shortName ( methodDoc . returnType ()),
503
+ returnTypeName ,
488
504
mapVisibility (methodDoc ),
489
505
methodDoc .isAbstract (),
490
506
methodDoc .isStatic ());
0 commit comments