public class ProxyUtils
extends java.lang.Object
| Constructor and Description |
|---|
ProxyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
emptyInstance(java.lang.Class<T> interfaceClass)
Creates an empty implementation of specified interface.
|
static java.lang.reflect.InvocationHandler |
getEmpty()
Returns invocation handler which does nothing.
|
public static java.lang.reflect.InvocationHandler getEmpty()
EmptyInvocationHandlerpublic static <T> T emptyInstance(java.lang.Class<T> interfaceClass)
Main use case is easy creation of "null value" objects and free functional code from empty inner classes.
// usage example
// MouseListener listener = Utils.emptyInstance(MouseListener.class);
interfaceClass - Class an interface to create implementation for