Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » When does the system inject @Optional annotated fields?
When does the system inject @Optional annotated fields? [message #989275] Wed, 05 December 2012 13:17 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
I have some fields, which are annotated by @Optional.

Those fields seem to be empty at creation time, because the required
objects are not yet in the Context,

But when the methods are executed, which use the Optional fields - the objects are there.

What happens, if the @Optional annotated fields could not be injected at creation time?
Will they be injected by te system, as soon as those objects become available?
Re: When does the system inject @Optional annotated fields? [message #989573 is a reply to message #989275] Thu, 06 December 2012 19:39 Go to previous message
Lars Vogel Unavailable until 15 August 2016 is currently offline Lars Vogel Unavailable until 15 August 2016Friend
Messages: 1051
Registered: July 2009
Senior Member

Yes. Have a look at the Javadoc for @Optional.

I suggest you fire up your friend the debugger and have a look at the behavior.Eclipse Debugger.
Previous Topic:Error exporting the Eclipse4 Product
Next Topic:Does a Lifecycle / Context creation diagram exist for e4?
Goto Forum:

Current Time: Wed Feb 21 06:12:39 GMT 2018

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

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