java-classmate icon indicating copy to clipboard operation
java-classmate copied to clipboard

ResolvedType.getAllTypes() returns parent, this, and interfaces

Open krzysiekbielicki opened this issue 4 years ago • 3 comments

Convenience method for the full set of types for a type (fixes #50)

krzysiekbielicki avatar Oct 15 '20 14:10 krzysiekbielicki

@krzysiekbielicki Thank you for contributing this! I hope to check out PR soon but have a few things queued up -- but I wanted to add a note to say that I saw this and will try to get to it ASAP.

@ljnelson WDYT?

cowtowncoder avatar Oct 16 '20 23:10 cowtowncoder

I'll let you folks figure it out. I did my own thing over here. I opted to always include the full set of types, i.e. not just the parent but the grandparent and so on. See: https://microbean.github.io/microbean-type/apidocs/org/microbean/type/Types.html#toTypes(java.lang.reflect.Type)

ljnelson avatar Oct 17 '20 03:10 ljnelson

Ah, right. So as implemented the method does not include types recursively, but only immediate parent. So yes, that should be added; at least I don't see as much value in something that only includes immediate super types.

cowtowncoder avatar Oct 17 '20 23:10 cowtowncoder