I'm creating a C++ library, and I want to port it to java. I have a method which gets a RAWINPUTDEVICELIST by calling GetRawInputDeviceList(), and scrolls through the array and converts each item to an instance of a class called Device and adds them to an array, in C++. I want to call this method and convert the contents of the list to an array of java classes, called something like Device, and assign the variables that it contains to the values of the C++ class.
EDIT: Pretend that the array I want to convert contains instances of a C++ class which looks like this:
class CplusplusExampleClass {
public:
    int variable;
};
I want to convert all those instances of that class which is contained in the C++ array to corresponding instances of a java class. Pretend that the java class looks like this:
public class JavaExampleClass {
    public int variable;
}
This is possible to do with the method described in the answer to the question suggested by @Gergely, to just convert the integer and then create a new instance, for each class, but pretend that the classes contains lots of stuff, like objects (class instances), other variables etc.
Is this possible, and then, how can I do it?
 
     
    