I have an existing library (JPhysX) that is a Java wrapper for a native C++ library (PhysX). The Java library makes use of types generated by SWIG, for example, , which represents a pointer to an com.jphysx.SWIGTYPE_p_NxStreamNxStream object in the C++ code. Now I want to create my own C++ class that inherits from the C++ type NxStream, and have the Java wrapper for my class also inherit from the wrapper .com.jphysx.SWIGTYPE_p_NxStream
The problem is that when I call SWIG to generate the wrapper for my class, it also creates a new wrapper called , which is functionally identical to the one in SWIGTYPE_p_NxStream, but still a different type as far as Java is concerned.com.jphysx
How can I convince SWIG to reuse this existing wrapper from com.jphysx and make the wrapper of my class inherit from instead?com.jphysx.SWIGTYPE_p_NxStream