Class EventUtils.EventBindingInvocationHandler

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

private static 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 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

    • 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:
      Throwable - if an error occurs
    • hasMatchingParametersMethod

      private boolean hasMatchingParametersMethod(Method method)
      Checks 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