public dynamic New(params object[] args) { ParameterInfo[] info = ParameterInfo.GetParameterInfo(_vm, args); bool[] needBoxing; IntPtr method = GetConstructor(info.Select(i => i.Type), out needBoxing); if (method == IntPtr.Zero) { throw new InvalidOperationException("No appropriate constructor found."); } return(new JavaObject(_vm, _vm.NewObject(_jniClass, _vm.FromReflectedMethod(method), info.Select((p, i) => p.Value(_vm, needBoxing[i])).ToArray()), this)); }