Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » DI Question
DI Question [message #572701] Fri, 02 April 2010 13:11
Max Bureck is currently offline Max BureckFriend
Messages: 72
Registered: July 2009

I was browsing through the EclipseCon e4 slides and found this piece of

private void setSelection(@Optional @Named(IServiceConstants.SELECTION)
Contact contact) {

Why do you use @Named with string constants defined in an interface
instead of using qualifier annotations? @Selection would be much shorter
than @Named(IServiceConstants.SELECTION). And in addition to that: It's
bad style to use interfaces for the sole purpose to hold constants (see
Joshua Bloch, Effective Java, Item 19: Use interfaces only to define types).

Best regards,
Previous Topic:XWT. May be not accurate handling of element properties
Next Topic:e4 app based on Contact demo has problem with IEclipseContext
Goto Forum:

Current Time: Wed Sep 23 11:06:38 GMT 2020

Powered by FUDForum. Page generated in 0.02863 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top