Javet icon indicating copy to clipboard operation
Javet copied to clipboard

Issue with converter plugins using JavetJVMInterceptor

Open Losin6450 opened this issue 1 year ago • 1 comments

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

Losin6450 avatar Aug 09 '24 16:08 Losin6450

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.

caoccao avatar Aug 09 '24 22:08 caoccao