public static IRubyObject trySimpleConversions(Ruby runtime, Object object) { if ( object == null ) return runtime.getNil(); if ( object instanceof IRubyObject ) return (IRubyObject) object; if ( object instanceof RubyObjectHolderProxy ) { return ((RubyObjectHolderProxy) object).__ruby_object(); } if ( object instanceof InternalJavaProxy ) { final InternalJavaProxy internalJavaProxy = (InternalJavaProxy) object; IRubyObject orig = internalJavaProxy.___getInvocationHandler().getOrig(); if (orig != null) return orig; } return null; }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee); } }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2, arg3); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1, arg2, arg3); } }
public static IRubyObject trySimpleConversions(Ruby runtime, Object object) { if ( object == null ) return runtime.getNil(); if ( object instanceof IRubyObject ) return (IRubyObject) object; if ( object instanceof RubyObjectHolderProxy ) { return ((RubyObjectHolderProxy) object).__ruby_object(); } if ( object instanceof InternalJavaProxy ) { final InternalJavaProxy internalJavaProxy = (InternalJavaProxy) object; IRubyObject orig = internalJavaProxy.___getInvocationHandler().getOrig(); if (orig != null) return orig; } return null; }
private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0, Object arg1, Object arg2) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2); } else { return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1, arg2); } }
private static IRubyObject trySimpleConversions(Ruby runtime, Object object) { if (object == null) { return runtime.getNil(); } if (object instanceof IRubyObject) { return (IRubyObject) object; } if (object instanceof RubyObjectHolderProxy) { return ((RubyObjectHolderProxy) object).__ruby_object(); } if (object instanceof InternalJavaProxy) { InternalJavaProxy internalJavaProxy = (InternalJavaProxy) object; IRubyObject orig = internalJavaProxy.___getInvocationHandler().getOrig(); if (orig != null) { return orig; } } return null; }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1, arg2); } }
private static IRubyObject trySimpleConversions(Ruby runtime, Object object) { if (object == null) { return runtime.getNil(); } if (object instanceof IRubyObject) { return (IRubyObject) object; } if (object instanceof RubyObjectHolderProxy) { return ((RubyObjectHolderProxy) object).__ruby_object(); } if (object instanceof InternalJavaProxy) { InternalJavaProxy internalJavaProxy = (InternalJavaProxy) object; IRubyObject orig = internalJavaProxy.___getInvocationHandler().getOrig(); if (orig != null) { return orig; } } return null; }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2, arg3); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1, arg2, arg3); } }
public void marshal(Object o, HierarchicalStreamWriter writer, MarshallingContext context) { InternalJavaProxy p = (InternalJavaProxy)o; IRubyObject base = p.___getInvocationHandler().getOrig(); writer.startNode("ruby-object"); context.convertAnother(base); writer.endNode(); // marshal the Java portion of it, which comes from the base type reflectionConverter.marshal(o,writer,context); }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee); } }
final IRubyObject target = ((InternalJavaProxy) ex).___getInvocationHandler().getOrig(); if ( target != null ) return ((RubyClass) catchable).isInstance(target);
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1); } }
final IRubyObject target = ((InternalJavaProxy) ex).___getInvocationHandler().getOrig(); if ( target != null ) return ((RubyClass) catchable).isInstance(target);
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object... args) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, args); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, args); } }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0); } }
private IRubyObject tryProxyInvocation(Object javaInvokee) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee); } else { return invokeDirectWithExceptionHandling(method, javaInvokee); } }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1); } }
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(context, jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2); } else { return invokeDirectWithExceptionHandling(context, method, javaInvokee, arg0, arg1, arg2); } }
private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0) { JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0); } else { return invokeDirectWithExceptionHandling(method, javaInvokee, arg0); } }