Proxy.NewProxyInstance(ClassLoader, Class[], IInvocationHandler) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
[Android.Runtime.Register("newProxyInstance", "(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;", "")]
public static Java.Lang.Object NewProxyInstance (Java.Lang.ClassLoader? loader, Java.Lang.Class[] interfaces, Java.Lang.Reflect.IInvocationHandler h);
[<Android.Runtime.Register("newProxyInstance", "(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;", "")>]
static member NewProxyInstance : Java.Lang.ClassLoader * Java.Lang.Class[] * Java.Lang.Reflect.IInvocationHandler -> Java.Lang.Object
Parameters
- loader
- ClassLoader
the class loader to define the proxy class
- interfaces
- Class[]
the list of interfaces for the proxy class to implement
the invocation handler to dispatch method invocations to
Returns
a proxy instance with the specified invocation handler of a proxy class that is defined by the specified class loader and that implements the specified interfaces
- Attributes
Remarks
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
Proxy.newProxyInstance
throws IllegalArgumentException
for the same reasons that Proxy.getProxyClass
does.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.