Class EventUtils.EventBindingInvocationHandler

java.lang.Object
org.apache.commons.lang3.event.EventUtils.EventBindingInvocationHandler
All Implemented Interfaces:
InvocationHandler
Enclosing class:
EventUtils

private static final class EventUtils.EventBindingInvocationHandler extends Object implements InvocationHandler
  • Field Details

    • target

      private final Object target
    • methodName

      private final String methodName
    • eventTypes

      private final Set<String> eventTypes
  • Constructor Details

    • EventBindingInvocationHandler

      EventBindingInvocationHandler(Object target, String methodName, String[] eventTypes)
      Creates a new instance of EventUtils.EventBindingInvocationHandler.
      Parameters:
      target - The target object for method invocations.
      methodName - The name of the method to be invoked.
      eventTypes - The names of the supported event types.
  • Method Details

    • hasMatchingParametersMethod

      private boolean hasMatchingParametersMethod(Method method)
      Tests whether a method for the passed in parameters can be found.
      Parameters:
      method - The listener method invoked.
      Returns:
      A flag whether the parameters could be matched.
    • invoke

      public Object invoke(Object proxy, Method method, Object[] parameters) throws Throwable
      Handles a method invocation on the proxy object.
      Specified by:
      invoke in interface InvocationHandler
      Parameters:
      proxy - The proxy instance.
      method - The method to be invoked.
      parameters - The parameters for the method invocation.
      Returns:
      The result of the method call.
      Throws:
      SecurityException - Thrown if an underlying accessible object's method denies the request.
      Throwable - Thrown if an error occurs.
      See Also: