@@ -75,13 +75,25 @@ class GenericType extends RefType {
7575 * Gets the number of type parameters of this generic type.
7676 */
7777 int getNumberOfTypeParameters ( ) { result = strictcount ( getATypeParameter ( ) ) }
78+
79+ override string getAPrimaryQlClass ( ) { result = "GenericType" }
7880}
7981
8082/** 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+ }
8289
8390/** 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+ }
8597
8698/**
8799 * A common super-class for Java types that may have a type bound.
@@ -115,6 +127,8 @@ abstract class BoundedType extends RefType, @boundedtype {
115127 or
116128 result = getUpperBoundType ( ) .( BoundedType ) .getAnUltimateUpperBoundType ( )
117129 }
130+
131+ override string getAPrimaryQlClass ( ) { result = "BoundedType" }
118132}
119133
120134/**
@@ -354,13 +368,25 @@ class ParameterizedType extends RefType {
354368
355369 /** Holds if this type originates from source code. */
356370 override predicate fromSource ( ) { typeVars ( _, _, _, _, this ) and RefType .super .fromSource ( ) }
371+
372+ override string getAPrimaryQlClass ( ) { result = "ParameterizedType" }
357373}
358374
359375/** 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+ }
361382
362383/** 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+ }
364390
365391/**
366392 * The raw version of a generic type is the type that is formed by
@@ -384,13 +410,25 @@ class RawType extends RefType {
384410
385411 /** Holds if this type originates from source code. */
386412 override predicate fromSource ( ) { not any ( ) }
413+
414+ override string getAPrimaryQlClass ( ) { result = "RawType" }
387415}
388416
389417/** 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+ }
391424
392425/** 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+ }
394432
395433// -------- Generic callables --------
396434/**
0 commit comments