protected Object invoke(final InjectionResources injectionResources) { String description = String.format("Invoking method %s", toString()); ObjectCreator<Object> plan = InternalUtils.createMethodInvocationPlan(resources.getTracker(), resources, injectionResources, logger, description, getModuleInstance(), method); return plan.createObject(); } }
protected Object invoke(final InjectionResources injectionResources) { String description = String.format("Invoking method %s", toString()); ObjectCreator<Object> plan = InternalUtils.createMethodInvocationPlan(resources.getTracker(), resources, injectionResources, logger, description, getModuleInstance(), method); return plan.createObject(); } }
private ObjectCreator<Object> getPlan() { if (plan == null) { // Defer getting (and possibly instantiating) the module instance until the last possible // moment. If the method is static, there's no need to even get the builder. final Object moduleInstance = InternalUtils.isStatic(builderMethod) ? null : resources.getModuleBuilder(); plan = InternalUtils.createMethodInvocationPlan(resources.getTracker(), resources, createInjectionResources(), logger, "Constructing service implementation via " + creatorDescription, moduleInstance, builderMethod); } return plan; }
private ObjectCreator<Object> getPlan() { if (plan == null) { // Defer getting (and possibly instantiating) the module instance until the last possible // moment. If the method is static, there's no need to even get the builder. final Object moduleInstance = InternalUtils.isStatic(builderMethod) ? null : resources.getModuleBuilder(); plan = InternalUtils.createMethodInvocationPlan(resources.getTracker(), resources, createInjectionResources(), logger, "Constructing service implementation via " + creatorDescription, moduleInstance, builderMethod); } return plan; }