| Modifier and Type | Method and Description |
|---|---|
static <T> T |
create(Class<T> interfaceType,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
static Object |
create(ClassLoader loader,
Class<?>[] interfaces,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
static <T> T |
create(ClassLoader loader,
Class<T> interfaceType,
Class<?>[] interfaces,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
static <T> T |
create(ClassLoader loader,
Class<T> interfaceType,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
static <T> T |
create(ClassLoader loader,
Class<T> interfaceType,
List<Class<?>> interfaces,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
static Object |
create(ClassLoader loader,
List<Class<?>> interfaces,
InvocationHandler handler)
Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler.
|
@Nonnull public static <T> T create(@Nonnull Class<T> interfaceType, @Nonnull InvocationHandler handler)
T - the typeinterfaceType - the interface for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interface@Nonnull public static <T> T create(@Nonnull ClassLoader loader, @Nonnull Class<T> interfaceType, @Nonnull InvocationHandler handler)
T - the typeloader - the class loader to define the proxy classinterfaceType - the interface for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interface@Nonnull public static <T> T create(@Nonnull ClassLoader loader, @Nonnull Class<T> interfaceType, @Nonnull List<Class<?>> interfaces, @Nonnull InvocationHandler handler)
T - the typeloader - the class loader to define the proxy classinterfaceType - the interface for the proxy class to implementinterfaces - the list of interfaces for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interface@Nonnull public static <T> T create(@Nonnull ClassLoader loader, @Nonnull Class<T> interfaceType, @Nonnull Class<?>[] interfaces, @Nonnull InvocationHandler handler)
T - the typeloader - the class loader to define the proxy classinterfaceType - the interface for the proxy class to implementinterfaces - the list of interfaces for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interface@Nonnull public static Object create(@Nonnull ClassLoader loader, @Nonnull List<Class<?>> interfaces, @Nonnull InvocationHandler handler)
loader - the class loader to define the proxy classinterfaces - the list of interfaces for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interface@Nonnull public static Object create(@Nonnull ClassLoader loader, @Nonnull Class<?>[] interfaces, @Nonnull InvocationHandler handler)
loader - the class loader to define the proxy classinterfaces - the array of interfaces for the proxy class to implementhandler - the invocation handler to dispatch method invocations toIllegalArgumentException - if interfaces contains a class that is not an interfaceProxy.newProxyInstance(ClassLoader, Class[], InvocationHandler)Copyright © 2022. All rights reserved.