BuilderConfigurationWrapperFactory.class.getClassLoader(), fetchSupportedInterfaces(ifcClass, evSrcSupport), new BuilderConfigurationWrapperInvocationHandler(builder, evSrcSupport)));
/** * Handles method invocations. This implementation handles methods of * two different interfaces: * <ul> * <li>Methods from the {@code EventSource} interface are handled * according to the current support level.</li> * <li>Other method calls are delegated to the builder's configuration * object.</li> * </ul> * * @param proxy the proxy object * @param method the method to be invoked * @param args method arguments * @return the return value of the method * @throws Throwable if an error occurs */ @Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { if (EventSource.class.equals(method.getDeclaringClass())) { return handleEventSourceInvocation(method, args); } return handleConfigurationInvocation(method, args); }