Java annotations and base C++ code for the JNIManagedPeer open source library.  These annotations are attached to Java classes/methods, and the C++ code provides shared base classes.  JNIManagedPeer reflects on the Java .class files to generate C++ code using these.  The base code is freely available under the MIT license.