myClass myObj = new myClass(); myObj.x = 1; myObj.y = 2; Pointer myPointer = myObj.getPointer();