[
https://issues.jboss.org/browse/CDI-633?page=com.atlassian.jira.plugin.sy...
]
Sven Linstaedt commented on CDI-633:
------------------------------------
Some enhancement like that, yeah. A similar solution was already stated in CDI-493 and
CDI-516. This new API enhancement should accept any {{java.lang.reflect.Type}}, that does
not contain a TypeVariable, but will throw an {{IllegalArgumentException}} otherwise. Of
course only the raw type of the event object could only be checked against the type
parameter for consistency, so we loose a good amount of type safety here. But as these API
is primary meant to be used by extensions like the majority of {{BeanManager}} methods, at
least I am fine with it.
In addition the original methods ({{fireEvent(event, qualifiers)}} and
{{resolveObserverMethods(event, qualifiers)}}) must be kept for backward compability and
probably will keep the use the event object's class for resolution, which implies the
event class must not have any type variable as this will cause the documented
{{IllegalArgumentException}}.
Introduce BeanManager.event()
-----------------------------
Key: CDI-633
URL:
https://issues.jboss.org/browse/CDI-633
Project: CDI Specification Issues
Issue Type: Feature Request
Reporter: Martin Kouba
Fix For: 2.0 .Final
* this would allow to define the _specified type_ - the container may use the specified
type to infer the parameterized type of the event types
* the method should return {{javax.enterprise.event.Event<Object>}} with no
qualifiers
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)