dukeify / fake-jni

An implementation of the JNI and JVMTI with support for direct interaction between natively registered classes and JVM objects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove FakeJni::Field and FakeJni::Function for native class member registration

Matthewacon opened this issue · comments

Right now you must use the Function<&MyClass::myFunction> {} and Field<&MyClass::myField> {} breeder templates to register members on a native class. This change was made to mitigate an issue with implicit conversions from static member function pointers to void * and the subsequent incorrect registration as a void * field. This can be properly mitigated using CX::IsFunction, without the API boilerplate of breeder templates.

Note: the Constructor<MyClass, [Args...]> {} breeder template is still required to register constructors for native classes.