info.magnolia.objectfactory
Class CandidateParameterResolver

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

public class CandidateParameterResolver
extends Object
implements ParameterResolver

Parameter resolver which looks for suitable parameters in a set of candidates. Cannot handle null values since its unable to match them to a type. 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
CandidateParameterResolver(Object[] candidates)
           
 
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

CandidateParameterResolver

public CandidateParameterResolver(Object[] candidates)
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.