Beispiel #1
0
 public JavaObject(JniWrapper vm, IntPtr objectPointer, JavaClass javaClass)
 {
     _vm            = vm;
     _objectPointer = objectPointer;
     _methodClass   = new JMethodClass(_vm);
     _classClass    = new JClassClass(_vm);
     _objectClass   = new JObjectClass(_vm);
     if (javaClass == null && _objectPointer != IntPtr.Zero)
     {
         _class = new JavaClass(vm, jniClass: vm.GetObjectClass(_objectPointer), reflectedClass: _objectClass.GetClass(_objectPointer), name: null);
     }
     else
     {
         _class = javaClass;
     }
 }
Beispiel #2
0
        private string GetExceptionType(IntPtr exception)
        {
            IntPtr exceptionTypePtr = new JObjectClass(this).GetClass(exception);

            return(new JClassClass(this).GetName(exceptionTypePtr));
        }