Your understanding is a little off. Think of it this way: when you do Guice.createInjector(...)
, that's when Guice does all the reflection to figure out what depends on what and what needs to get injected where. When you do injector.getInstance(...)
, Guice doesn't need to do any reflection. It creates the RealBillingService
right then, injecting all its (transitive) dependencies, and returns that (not a proxy).
If you use Guice's AOP functionality then those objects will be proxies, but otherwise Guice doesn't return proxies. It simply invokes the @Inject
constructor, sets the @Inject
-annotated fields, calls the @Inject
-annotated methods, and returns that object.
EDIT: See also MiniGuice, a single-class implementation of a Guice-like injector.