[weld-issues] [JBoss JIRA] Resolved: (WELDX-179) Introduce @Qualified to have package name prepended to @Named value

Dan Allen (JIRA) jira-events at lists.jboss.org
Tue Oct 19 19:18:55 EDT 2010


     [ https://jira.jboss.org/browse/WELDX-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Allen resolved WELDX-179.
-----------------------------

    Fix Version/s: 1.0.0.Beta2
                       (was: TBC)
       Resolution: Done


> Introduce @Qualified to have package name prepended to @Named value
> -------------------------------------------------------------------
>
>                 Key: WELDX-179
>                 URL: https://jira.jboss.org/browse/WELDX-179
>             Project: Weld Extensions
>          Issue Type: Feature Request
>    Affects Versions: 1.0.0.Beta1
>            Reporter: Dan Allen
>            Assignee: Dan Allen
>            Priority: Minor
>             Fix For: 1.0.0.Beta2
>
>
> @Named gives the bean a name equal to the annotation value property or, if one is not specified, the decapitalized simple name of the type. This behavior is precisely what the majority of developers will appreciate. However, framework writers should avoid stomping on the root bean namespace, instead assigning qualified names to their built-in components. The motivation is the same as qualifying Java types.
> One way to accomplish this would be to include the package name in the name specified in the @Named annotation:
> @Named("org.jboss.seam.security.Identity")
> public class Identity ... { ... }
> However, this is not in the spirit of type-safety. As an alternative, Weld X can introduce an annotation which indicates that the bean name be qualified to the package in which the type resides.
> @Qualified @Named
> public class Identity ... { ... }
> This allows the bean name to be defaulted and keeps the package out of a string.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list