[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-5972) A bean doesn't have built-in qualifier types.
Alexey Kazakov (JIRA)
jira-events at lists.jboss.org
Mon Mar 1 11:29:10 EST 2010
A bean doesn't have built-in qualifier types.
---------------------------------------------
Key: JBIDE-5972
URL: https://jira.jboss.org/jira/browse/JBIDE-5972
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: cdi (jsr-299)
Affects Versions: 3.1.0.CR2
Reporter: Alexey Kazakov
Assignee: Viacheslav Kabanovich
Fix For: 3.2.next
See org.jboss.tools.cdi.core.test.tck.DefinitionTest.testQualifiersNonEmpty() JUnit test. It must pass.
See CDI spec for details:
2.3.1. Built-in qualifier types
Three standard qualifier types are defined in the package javax.enterprise.inject. In addition, the built-in qualifier type @Named is defined by the package javax.inject.
Every bean has the built-in qualifier @Any, even if it does not explicitly declare this qualifier, except for the special @New qualified beans defined in Section 3.12, "@New qualified beans".
If a bean does not explicitly declare a qualifier other than @Named, the bean has exactly one additional qualifier, of type @Default. This is called the default qualifier.
The following declarations are equivalent:
@Default
public class Order { ... }
public class Order { ... }
Both declarations result in a bean with two qualifiers: @Any and @Default.
The following declaration results in a bean with three qualifiers: @Any, @Default and @Named("ord").
@Named("ord")
public class Order { ... }
The default qualifier is also assumed for any injection point that does not explicitly declare a qualifier, as defined in Section 3.10, "The default qualifier at injection points". The following declarations, in which the use of the @Inject annotation identifies the constructor parameter as an injection point, are equivalent:
public class Order {
@Inject
public Order(@Default OrderProcessor processor) { ... }
}
public class Order {
@Inject
public Order(OrderProcessor processor) { ... }
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list