public static Object[] asUnwrappedArgumentArray(Object args) { return InvokerHelper.asUnwrappedArray(args); }
public final Object invoke(Object receiver, Object[] args) throws Throwable { try { return ((GroovyObject)receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } }
public final Object call(Object receiver, Object[] args) throws Throwable { if(receiver instanceof GroovyObject) { try { return ((GroovyObject) receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } } else { return CallSiteArray.defaultCall(this, receiver, args); } }
static Object invokePogoMethod(Object object, String methodName, Object arguments) { GroovyObject groovy = (GroovyObject) object; boolean intercepting = groovy instanceof GroovyInterceptable; try { // if it's a pure interceptable object (even intercepting toString(), clone(), ...) if (intercepting) { return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } //else try a statically typed method or a GDK method return groovy.getMetaClass().invokeMethod(object, methodName, asArray(arguments)); } catch (MissingMethodException e) { if (e instanceof MissingMethodExecutionFailed) { throw (MissingMethodException) e.getCause(); } else if (!intercepting && e.getMethod().equals(methodName) && object.getClass() == e.getType()) { // in case there's nothing else, invoke the object's own invokeMethod() return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } else { throw e; } } }
public final Object invoke(Object receiver, Object[] args) throws Throwable { try { return ((GroovyObject)receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } }
public final Object invoke(Object receiver, Object[] args) throws Throwable { try { return ((GroovyObject)receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } }
public final Object invoke(Object receiver, Object[] args) throws Throwable { try { return ((GroovyObject)receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } }
public final Object call(Object receiver, Object[] args) throws Throwable { if(receiver instanceof GroovyObject) { try { return ((GroovyObject) receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } } else { return CallSiteArray.defaultCall(this, receiver, args); } }
public final Object call(Object receiver, Object[] args) throws Throwable { if(receiver instanceof GroovyObject) { try { return ((GroovyObject) receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } } else { return CallSiteArray.defaultCall(this, receiver, args); } }
private static Object invokePogoMethod(Object object, String methodName, Object arguments) { GroovyObject groovy = (GroovyObject) object; boolean intercepting = groovy instanceof GroovyInterceptable; try { // if it's a pure interceptable object (even intercepting toString(), clone(), ...) if (intercepting) { return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } //else try a statically typed method or a GDK method return groovy.getMetaClass().invokeMethod(object, methodName, asArray(arguments)); } catch (MissingMethodException e) { if (e instanceof MissingMethodExecutionFailed) { throw (MissingMethodException) e.getCause(); } else if (!intercepting && e.getMethod().equals(methodName) && object.getClass() == e.getType()) { // in case there's nothing else, invoke the object's own invokeMethod() return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } else { throw e; } } }
public final Object call(Object receiver, Object[] args) throws Throwable { if(receiver instanceof GroovyObject) { try { return ((GroovyObject) receiver).invokeMethod(name, InvokerHelper.asUnwrappedArray(args)); } catch (GroovyRuntimeException gre) { throw ScriptBytecodeAdapter.unwrap(gre); } } else { return CallSiteArray.defaultCall(this, receiver, args); } }
static Object invokePogoMethod(Object object, String methodName, Object arguments) { GroovyObject groovy = (GroovyObject) object; boolean intercepting = groovy instanceof GroovyInterceptable; try { // if it's a pure interceptable object (even intercepting toString(), clone(), ...) if (intercepting) { return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } //else try a statically typed method or a GDK method return groovy.getMetaClass().invokeMethod(object, methodName, asArray(arguments)); } catch (MissingMethodException e) { if (e instanceof MissingMethodExecutionFailed) { throw (MissingMethodException) e.getCause(); } else if (!intercepting && e.getMethod().equals(methodName) && object.getClass() == e.getType()) { // in case there's nothing else, invoke the object's own invokeMethod() return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } else { throw e; } } }
static Object invokePogoMethod(Object object, String methodName, Object arguments) { GroovyObject groovy = (GroovyObject) object; boolean intercepting = groovy instanceof GroovyInterceptable; try { // if it's a pure interceptable object (even intercepting toString(), clone(), ...) if (intercepting) { return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } //else try a statically typed method or a GDK method return groovy.getMetaClass().invokeMethod(object, methodName, asArray(arguments)); } catch (MissingMethodException e) { if (e instanceof MissingMethodExecutionFailed) { throw (MissingMethodException) e.getCause(); } else if (!intercepting && e.getMethod().equals(methodName) && object.getClass() == e.getType()) { // in case there's nothing else, invoke the object's own invokeMethod() return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } else { throw e; } } }
static Object invokePogoMethod(Object object, String methodName, Object arguments) { GroovyObject groovy = (GroovyObject) object; boolean intercepting = groovy instanceof GroovyInterceptable; try { // if it's a pure interceptable object (even intercepting toString(), clone(), ...) if (intercepting) { return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } //else try a statically typed method or a GDK method return groovy.getMetaClass().invokeMethod(object, methodName, asArray(arguments)); } catch (MissingMethodException e) { if (e instanceof MissingMethodExecutionFailed) { throw (MissingMethodException) e.getCause(); } else if (!intercepting && e.getMethod().equals(methodName) && object.getClass() == e.getType()) { // in case there's nothing else, invoke the object's own invokeMethod() return groovy.invokeMethod(methodName, asUnwrappedArray(arguments)); } else { throw e; } } }