private Object produceEvent() throws InvocationTargetException {
  if (!valid) {
    throw new IllegalStateException(toString() + " has been invalidated and can no longer produce events.");
  }
  try {
    return method.invoke(target);
  }
 catch (  IllegalAccessException e) {
    throw new AssertionError(e);
  }
catch (  InvocationTargetException e) {
    if (e.getCause() instanceof Error) {
      throw (Error)e.getCause();
    }
    throw e;
  }
}

private Object produceEvent ( ) throws InvocationTargetException { if ( ! valid ) { throw new IllegalStateException ( toString ( ) + " has been invalidated and can no longer produce events." ) ; } try { return method . invoke ( target ) ; } catch ( IllegalAccessException e ) { throw new AssertionError ( e ) ; } catch ( InvocationTargetException e ) { if ( e . getCause ( ) instanceof Error ) { throw ( Error ) e . getCause ( ) ; } throw e ; } }
invokes the wrapped producer method .
