Skip to content

Expose type parameters of JavaClass #115

Closed
@wolfs

Description

@wolfs

It should be possible to obtain the type parameters for a JavaClass.

When given code like this:

public class Foo implements List<Bar> {
}

I now want to obtain the type parameters of the interface. Same goes for fields, method return types and parameters, etc.

Something like this would be great:

JavaClass genericType = <List<Foo>>
genericType.isAssignableTo(Iterable.class) // true, I guess that works already
genericType.getTypeParameters() == [Foo]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions