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

Issue with converter plugins using JavetJVMInterceptor #381

Open
Losin6450 opened this issue Aug 9, 2024 · 1 comment
Open

Issue with converter plugins using JavetJVMInterceptor #381

Losin6450 opened this issue Aug 9, 2024 · 1 comment

Comments

@Losin6450
Copy link

Losin6450 commented Aug 9, 2024

due to JavetJVMInterceptor using a static Converter (here) its not possible to add plugins to the converter without using reflection. Another issue with converters is with this line here if the object being passed to the method is already a class the class then becomes java.lang.Class which doesn't really give much information when needing to make plugins. This becomes an issue with what i want to accomplish which is making a converter plugin that make interface classes into class javascript objects a fix to this could be passing the object itself instead of its class here

@caoccao
Copy link
Owner

caoccao commented Aug 9, 2024

The class mode is not what you described to be. If the converter finds the object is a class, it directly puts that class in the internal data structure.

I think the approach seems right if you want to achieve extend in #365. A plugin for Class might be possible. Of course, Javet cannot reference ByteBuddy so that such plugin will not be part of Javet.

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

2 participants