This content has been marked as final.
Show 2 replies
-
1. Re: @In and @Factory
nickarls Feb 8, 2008 9:11 AM (in response to gersonk)if (x == null) { initX(); }
;-)
If think that if someMethod is called before "x" has been referenced, it can be null. -
2. Re: @In and @Factory
norman.richards Feb 8, 2008 12:03 PM (in response to gersonk)Factories are not for initializing your state for your own use. You could probably self-inject x or call Component.getInstance() or something. If you are really trying to expose that state outside your object and need it internally, put an @Create on that @Factory method.