info.magnolia.objectfactory.guice
Class GuiceParameterResolver

java.lang.Object
  extended by info.magnolia.objectfactory.guice.GuiceParameterResolver
All Implemented Interfaces:
ParameterResolver

public class GuiceParameterResolver
extends Object
implements ParameterResolver

Parameter resolver that finds parameters by querying for them in a Guice Injector. Will create javax.inject.Provider instances that match the parameter's type.

Version:
$Id$

Field Summary
 
Fields inherited from interface info.magnolia.objectfactory.ParameterResolver
UNRESOLVED
 
Constructor Summary
GuiceParameterResolver(GuiceComponentProvider componentProvider)
           
GuiceParameterResolver(com.google.inject.Injector injector)
           
 
Method Summary
 Object resolveParameter(ParameterInfo parameter)
          Returns the instance to use for the parameter or UNRESOLVED if it cannot provider a value for this parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiceParameterResolver

public GuiceParameterResolver(com.google.inject.Injector injector)

GuiceParameterResolver

public GuiceParameterResolver(GuiceComponentProvider componentProvider)
Method Detail

resolveParameter

public Object resolveParameter(ParameterInfo parameter)
Description copied from interface: ParameterResolver
Returns the instance to use for the parameter or UNRESOLVED if it cannot provider a value for this parameter.

Specified by:
resolveParameter in interface ParameterResolver


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.