You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with Types and not Classes, it's rather hard to tell if a given type is a super- (or sub-) type of another, as there is no equivalent to Class#isAssignableFrom. GentyRef has a method for this, GenericTypeReflector.isSuperType(superType, subType), but that lib is rather outdated and seems unmaintained, and it generally doesn't make sense to add another type resolution lib.
The text was updated successfully, but these errors were encountered:
@kaqqao Sounds reasonable, just need to figure out where to put that in an API, and whether to do "same or supertype" or strict "is supertype", as well as combinations (maybe allow Class<?> argument and resolved one).
I do not remember the background here, but it would seem to me that this relationship could be relatively easily be determined by comparing "raw classes" of two types, no?
(this wouldn't verify generic type compatibility but should otherwise work fine)
When dealing with Types and not Classes, it's rather hard to tell if a given type is a super- (or sub-) type of another, as there is no equivalent to
Class#isAssignableFrom
.GentyRef has a method for this,
GenericTypeReflector.isSuperType(superType, subType)
, but that lib is rather outdated and seems unmaintained, and it generally doesn't make sense to add another type resolution lib.The text was updated successfully, but these errors were encountered: