public final void fire() {
		Descriptor<?> descriptor = container.instances().get(component);
		Collection<Method> methods = descriptor.lifecycles().get(lifecycle);
		logger.debug("Event [" + lifecycle.getSimpleName()
				+ "] fires on component [" + descriptor + "]");
		
		if (methods.isEmpty() && lifecycle.equals(Failed.class)) {
			throw ((LifecycleException) args[0]);
		}
		
		for (Method method : methods) {
			if (!method.isAccessible()) {
				method.setAccessible(true);
			}
			
			try {
				if (method.getParameterTypes().length == 0) {
					method.invoke(component);
				} else {
					method.invoke(component, args);
				}
				
				continue;
			} catch (InvocationTargetException e) {
				logger.warn("Exception from [" + lifecycle.getSimpleName()
						+ " (" + method + ")] event listener on component ["
						+ descriptor + "]", e.getTargetException());
				if (lifecycle.equals(Failed.class)) {
					throw new LifecycleException(e.getTargetException(), lifecycle, component);
				} else {
					Event.of(Failed.class).with(new LifecycleException(e.getTargetException(), lifecycle, component)).on(component).fire();
				}
				
			} catch (Exception e) {
				logger.warn("Cannot fire [" + lifecycle.getSimpleName()
						+ " (" + method + ")] event on component ["
						+ descriptor + "]", e);
			}
		}
	}
public final void fire ( ) { Descriptor < ? > descriptor = container . instances ( ) . get ( component ) ; Collection < Method > methods = descriptor . lifecycles ( ) . get ( lifecycle ) ; logger . debug ( "Event [" + lifecycle . getSimpleName ( ) + "] fires on component [" + descriptor + "]" ) ; if ( methods . isEmpty ( ) && lifecycle . equals ( Failed . class ) ) { throw ( ( LifecycleException ) args [ 0 ] ) ; } for ( Method method : methods ) { if ( ! method . isAccessible ( ) ) { method . setAccessible ( true ) ; } try { if ( method . getParameterTypes ( ) . length == 0 ) { method . invoke ( component ) ; } else { method . invoke ( component , args ) ; } continue ; } catch ( InvocationTargetException e ) { logger . warn ( "Exception from [" + lifecycle . getSimpleName ( ) + " (" + method + ")] event listener on component [" + descriptor + "]" , e . getTargetException ( ) ) ; if ( lifecycle . equals ( Failed . class ) ) { throw new LifecycleException ( e . getTargetException ( ) , lifecycle , component ) ; } else { Event . of ( Failed . class ) . with ( new LifecycleException ( e . getTargetException ( ) , lifecycle , component ) ) . on ( component ) . fire ( ) ; } } catch ( Exception e ) { logger . warn ( "Cannot fire [" + lifecycle . getSimpleName ( ) + " (" + method + ")] event on component [" + descriptor + "]" , e ) ; } } }
Calls back the methods listening to the lifecycle on the specified
components.
If an exception has occurred, this method catches it and raises
{@link Failed} event on the component.