/** Chain invocation to the native function. */ @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (Library.Handler.OBJECT_TOSTRING.equals(method)) { String str = "Proxy interface to " + function; Method m = (Method)options.get(Function.OPTION_INVOKING_METHOD); Class<?> cls = findCallbackClass(m.getDeclaringClass()); str += " (" + cls.getName() + ")"; return str; } else if (Library.Handler.OBJECT_HASHCODE.equals(method)) { return Integer.valueOf(hashCode()); } else if (Library.Handler.OBJECT_EQUALS.equals(method)) { Object o = args[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Function.valueOf(Proxy.getInvocationHandler(o) == this); } return Boolean.FALSE; } if (Function.isVarArgs(method)) { args = Function.concatenateVarArgs(args); } return function.invoke(method.getReturnType(), args, options); }
Object o = inArgs[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Function.valueOf(Proxy.getInvocationHandler(o) == this);
result = null; } else if (returnType==boolean.class || returnType==Boolean.class) { result = valueOf(Native.invokeInt(this, this.peer, callFlags, args) != 0); } else if (returnType==byte.class || returnType==Byte.class) { result = Byte.valueOf((byte)Native.invokeInt(this, this.peer, callFlags, args));
value = Function.valueOf(((Number)value).intValue() != 0);
result = Function.valueOf(getInt(offset) != 0); } else if (type == byte.class || type == Byte.class) { result = Byte.valueOf(getByte(offset));
/** Chain invocation to the native function. */ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (Library.Handler.OBJECT_TOSTRING.equals(method)) { return "Proxy interface to " + function; } else if (Library.Handler.OBJECT_HASHCODE.equals(method)) { return new Integer(hashCode()); } else if (Library.Handler.OBJECT_EQUALS.equals(method)) { Object o = args[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Boolean.valueOf(Proxy.getInvocationHandler(o) == this); } return Boolean.FALSE; } if (Function.isVarArgs(method)) { args = Function.concatenateVarArgs(args); } return function.invoke(method.getReturnType(), args, options); }
/** Chain invocation to the native function. */ @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (Library.Handler.OBJECT_TOSTRING.equals(method)) { String str = "Proxy interface to " + function; Method m = (Method)options.get(Function.OPTION_INVOKING_METHOD); Class<?> cls = findCallbackClass(m.getDeclaringClass()); str += " (" + cls.getName() + ")"; return str; } else if (Library.Handler.OBJECT_HASHCODE.equals(method)) { return Integer.valueOf(hashCode()); } else if (Library.Handler.OBJECT_EQUALS.equals(method)) { Object o = args[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Function.valueOf(Proxy.getInvocationHandler(o) == this); } return Boolean.FALSE; } if (Function.isVarArgs(method)) { args = Function.concatenateVarArgs(args); } return function.invoke(method.getReturnType(), args, options); }
Object o = inArgs[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Function.valueOf(Proxy.getInvocationHandler(o) == this);
Object o = inArgs[0]; if (o != null && Proxy.isProxyClass(o.getClass())) { return Boolean.valueOf(Proxy.getInvocationHandler(o) == this);
value = Boolean.valueOf(((Number)value).intValue() != 0);
result = null; } else if (returnType==boolean.class || returnType==Boolean.class) { result = valueOf(Native.invokeInt(this, this.peer, callFlags, args) != 0); } else if (returnType==byte.class || returnType==Byte.class) { result = Byte.valueOf((byte)Native.invokeInt(this, this.peer, callFlags, args));
value = Function.valueOf(((Number)value).intValue() != 0);
result = Function.valueOf(getInt(offset) != 0); } else if (type == byte.class || type == Byte.class) { result = Byte.valueOf(getByte(offset));
result = Boolean.valueOf(invokeInt(callingConvention, args) != 0);