private static class EventUtils.EventBindingInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<java.lang.String> |
eventTypes |
private java.lang.String |
methodName |
private java.lang.Object |
target |
| Constructor and Description |
|---|
EventBindingInvocationHandler(java.lang.Object target,
java.lang.String methodName,
java.lang.String[] eventTypes)
Creates a new instance of
EventBindingInvocationHandler. |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
hasMatchingParametersMethod(java.lang.reflect.Method method)
Checks whether a method for the passed in parameters can be found.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Handles a method invocation on the proxy object.
|
private final java.lang.Object target
private final java.lang.String methodName
private final java.util.Set<java.lang.String> eventTypes
EventBindingInvocationHandler(java.lang.Object target,
java.lang.String methodName,
java.lang.String[] eventTypes)
EventBindingInvocationHandler.target - the target object for method invocationsmethodName - the name of the method to be invokedeventTypes - the names of the supported event typespublic java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerproxy - the proxy instancemethod - the method to be invokedparameters - the parameters for the method invocationjava.lang.Throwable - if an error occursprivate boolean hasMatchingParametersMethod(java.lang.reflect.Method method)
method - the listener method invoked