Java.Lang.Reflect.IInvocationHandler.Invoke Method
Handles the method which was originally invoked on the proxy instance.

Syntax

[Android.Runtime.Register("invoke", "(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", "GetInvoke_Ljava_lang_Object_Ljava_lang_reflect_Method_arrayLjava_lang_Object_Handler:Java.Lang.Reflect.IInvocationHandlerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object Invoke (Java.Lang.Object proxy, Method method, Java.Lang.Object[] args)

Parameters

proxy
the proxy instance on which the method was invoked
method
the method invoked on the proxy instance
args
an array of objects containing the parameters passed to the method, or null if no arguments are expected. Primitive types are boxed.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.Throwablethe exception to throw from the invoked method on the proxy. The exception must match one of the declared exception types of the invoked method or any unchecked exception type. If not then an UndeclaredThrowableException is thrown

Remarks

Handles the method which was originally invoked on the proxy instance. A typical usage pattern follows below:

java Example

 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
     //do some processing before the method invocation

     //invoke the method
     Object result = method.invoke(proxy, args);

     //do some processing after the method invocation
     return result;
 }

[Android Documentation]

Requirements

Namespace: Java.Lang.Reflect
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1