I have a component that loads a fairly large corpus off disk to perform 
language classification.

We have a few actually.

What I'd like to do is ONLY do initialization if I was actually injected.

I DO NOT want to do initialization it wasn't injected and isn't going to be 
used.  This should dramatically speed up our unit tests (we have thousands 
of them and a few seconds here and there adds up)

I can't do lazy init because then my code has additional and 
non-deterministic latency when first used.  Additionally, it now has to 
handle exceptions ... 

What I'd really like is an API so that it can detect that it was injected 
and then only do initialization now that its going to be used by some API.

Is this possible?

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/a30b61dd-a488-41b0-89de-467285032abd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to