use of javax.enterprise.inject.spi.EventMetadata in project core by weld.
the class BeanManagerImpl method fireEvent.
/**
* Fires an event object with given event object for given bindings
*
* @param event The event object to pass along
* @param qualifiers The binding types to match
* @see javax.enterprise.inject.spi.BeanManager#fireEvent(java.lang.Object, java.lang.annotation.Annotation[])
*/
@Override
public void fireEvent(Object event, Annotation... qualifiers) {
Preconditions.checkArgumentNotNull(event, "event");
Type eventType = Types.getCanonicalType(event.getClass());
EventMetadata metadata = new EventMetadataImpl(eventType, null, qualifiers);
globalStrictObserverNotifier.fireEvent(event, metadata, qualifiers);
}
use of javax.enterprise.inject.spi.EventMetadata in project core by weld.
the class EventImpl method createCachedObservers.
private CachedObservers createCachedObservers(Class<?> runtimeType) {
final Type eventType = getEventType(runtimeType);
// this performs type check
final ResolvedObservers<T> observers = getBeanManager().getGlobalStrictObserverNotifier().resolveObserverMethods(eventType, getQualifiers());
final EventMetadata metadata = new EventMetadataImpl(eventType, getInjectionPoint(), getQualifiers());
return new CachedObservers(runtimeType, observers, metadata);
}
Aggregations