Skip to content

Refactor SBG to support generics and proper handling of overridable methods #1322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vmutafov opened this issue Mar 20, 2019 · 0 comments
Closed
Assignees
Labels
needs docs Documentation is needed before closing
Milestone

Comments

@vmutafov
Copy link
Contributor

vmutafov commented Mar 20, 2019

Currently, the static binding generator has issues when extending Java classes which have generics or extend some class/interface which is generic. In order to fix that, there should be changes made in the logic for finding which methods could be overridden and to handle their argument and return types. Although this seems easy at first look, the fact that the Java generics are erased by the Java compiler is a big problem. This could be fixed reading the generics metadata in the Java class files produced by the compiler and manually creating a generics hierarchy view of the class/interface being extended. In that way there would be build time information about what concrete type would come in the place of the generic at runtime. After this is done, the search for overridable methods must be done according to the Java Language Specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Documentation is needed before closing
Projects
None yet
Development

No branches or pull requests

4 participants