@@ -75,13 +75,25 @@ class GenericType extends RefType {
75
75
* Gets the number of type parameters of this generic type.
76
76
*/
77
77
int getNumberOfTypeParameters ( ) { result = strictcount ( getATypeParameter ( ) ) }
78
+
79
+ override string getAPrimaryQlClass ( ) { result = "GenericType" }
78
80
}
79
81
80
82
/** A generic type that is a class. */
81
- class GenericClass extends GenericType , Class { }
83
+ class GenericClass extends GenericType , Class {
84
+ override string getAPrimaryQlClass ( ) {
85
+ result = Class .super .getAPrimaryQlClass ( ) or
86
+ result = GenericType .super .getAPrimaryQlClass ( )
87
+ }
88
+ }
82
89
83
90
/** A generic type that is an interface. */
84
- class GenericInterface extends GenericType , Interface { }
91
+ class GenericInterface extends GenericType , Interface {
92
+ override string getAPrimaryQlClass ( ) {
93
+ result = Interface .super .getAPrimaryQlClass ( ) or
94
+ result = GenericType .super .getAPrimaryQlClass ( )
95
+ }
96
+ }
85
97
86
98
/**
87
99
* A common super-class for Java types that may have a type bound.
@@ -115,6 +127,8 @@ abstract class BoundedType extends RefType, @boundedtype {
115
127
or
116
128
result = getUpperBoundType ( ) .( BoundedType ) .getAnUltimateUpperBoundType ( )
117
129
}
130
+
131
+ override string getAPrimaryQlClass ( ) { result = "BoundedType" }
118
132
}
119
133
120
134
/**
@@ -354,13 +368,25 @@ class ParameterizedType extends RefType {
354
368
355
369
/** Holds if this type originates from source code. */
356
370
override predicate fromSource ( ) { typeVars ( _, _, _, _, this ) and RefType .super .fromSource ( ) }
371
+
372
+ override string getAPrimaryQlClass ( ) { result = "ParameterizedType" }
357
373
}
358
374
359
375
/** A parameterized type that is a class. */
360
- class ParameterizedClass extends Class , ParameterizedType { }
376
+ class ParameterizedClass extends Class , ParameterizedType {
377
+ override string getAPrimaryQlClass ( ) {
378
+ result = Class .super .getAPrimaryQlClass ( ) or
379
+ result = ParameterizedType .super .getAPrimaryQlClass ( )
380
+ }
381
+ }
361
382
362
383
/** A parameterized type that is an interface. */
363
- class ParameterizedInterface extends Interface , ParameterizedType { }
384
+ class ParameterizedInterface extends Interface , ParameterizedType {
385
+ override string getAPrimaryQlClass ( ) {
386
+ result = Interface .super .getAPrimaryQlClass ( ) or
387
+ result = ParameterizedType .super .getAPrimaryQlClass ( )
388
+ }
389
+ }
364
390
365
391
/**
366
392
* The raw version of a generic type is the type that is formed by
@@ -384,13 +410,25 @@ class RawType extends RefType {
384
410
385
411
/** Holds if this type originates from source code. */
386
412
override predicate fromSource ( ) { not any ( ) }
413
+
414
+ override string getAPrimaryQlClass ( ) { result = "RawType" }
387
415
}
388
416
389
417
/** A raw type that is a class. */
390
- class RawClass extends Class , RawType { }
418
+ class RawClass extends Class , RawType {
419
+ override string getAPrimaryQlClass ( ) {
420
+ result = Class .super .getAPrimaryQlClass ( ) or
421
+ result = RawType .super .getAPrimaryQlClass ( )
422
+ }
423
+ }
391
424
392
425
/** A raw type that is an interface. */
393
- class RawInterface extends Interface , RawType { }
426
+ class RawInterface extends Interface , RawType {
427
+ override string getAPrimaryQlClass ( ) {
428
+ result = Interface .super .getAPrimaryQlClass ( ) or
429
+ result = RawType .super .getAPrimaryQlClass ( )
430
+ }
431
+ }
394
432
395
433
// -------- Generic callables --------
396
434
/**
0 commit comments