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. CoolBar support.
Next Topic:Watching e4 model from BundleActivator?
Goto Forum:

Current Time: Tue Apr 24 10:46:02 GMT 2018

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

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