Skip to content
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

Java inheritance #74

Open
uvlad7 opened this issue Mar 28, 2024 · 2 comments
Open

Java inheritance #74

uvlad7 opened this issue Mar 28, 2024 · 2 comments

Comments

@uvlad7
Copy link
Contributor

uvlad7 commented Mar 28, 2024

And support - if not supported yet - and tests.
The best way, I believe, is to make Rust wrapper of a child java class a NewType for a Rust wrapper of the according Java ancestor, with Deref trait implemented. It won't work exactly like in Java - with virtual methods - but it'll allow to call ancestor's methods from the descendant.

@uvlad7
Copy link
Contributor Author

uvlad7 commented Apr 1, 2024

Need to ensure it works well with abstract classes. And how to support interfaces: traits, separate types with cheap as/into conversions?

@uvlad7
Copy link
Contributor Author

uvlad7 commented Apr 10, 2024

Also check nested and inner classes, static fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant