public class BasicComponentParameter extends AbstractParameter implements Parameter, Serializable
Parameter.DelegateResolver, Parameter.NotResolved, Parameter.Resolver, Parameter.ValueResolver| Modifier and Type | Field and Description |
|---|---|
static BasicComponentParameter |
BASIC_DEFAULT
BASIC_DEFAULT is an instance of BasicComponentParameter using the default constructor. |
| Constructor and Description |
|---|
BasicComponentParameter()
Expect any parameter of the appropriate type.
|
BasicComponentParameter(Object componentKey)
Expect a parameter matching a component of a specific key.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Visit the current
Parameter. |
static ComponentAdapter<?> |
findInjectorOrInstanceAdapter(ComponentAdapter<?> f) |
static <T> String[] |
makeFoundAmbiguousStrings(Collection<ComponentAdapter<T>> found) |
Parameter.Resolver |
resolve(PicoContainer container,
ComponentAdapter<?> forAdapter,
ComponentAdapter<?> injecteeAdapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
Check whether the given Parameter can be satisfied by the container.
|
protected <T> ComponentAdapter<T> |
resolveAdapter(PicoContainer container,
ComponentAdapter adapter,
Class<T> expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding) |
void |
verify(PicoContainer container,
ComponentAdapter<?> forAdapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
Verify that the Parameter can satisfy the expected type using the container
|
isResolvable, resolveInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisResolvable, resolveInstancepublic static final BasicComponentParameter BASIC_DEFAULT
BASIC_DEFAULT is an instance of BasicComponentParameter using the default constructor.public BasicComponentParameter(Object componentKey)
componentKey - the key of the desired addComponentpublic BasicComponentParameter()
public Parameter.Resolver resolve(PicoContainer container, ComponentAdapter<?> forAdapter, ComponentAdapter<?> injecteeAdapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
resolve in interface Parametercontainer - the container from which dependencies are resolved.forAdapter - the ComponentAdapter that is asking for the instanceinjecteeAdapter - the adapter to be injected into (null for N/A)expectedType - the required typeexpectedNameBinding - Expected parameter nameuseNames - should use parameter names for disambiguationbinding - @return true if the component parameter can be resolved.true if the Parameter can be verified.PicoCompositionExceptionParameter#isResolvable(PicoContainer, ComponentAdapter, Class, NameBinding ,boolean, Annotation)public void verify(PicoContainer container, ComponentAdapter<?> forAdapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
Parameterverify in interface Parametercontainer - the container from which dependencies are resolved.forAdapter - the ComponentAdapter that is asking for the verificationexpectedType - the required typeexpectedNameBinding - Expected parameter namepublic void accept(PicoVisitor visitor)
Parameter.accept in interface Parametervisitor - the visitor.Parameter.accept(org.picocontainer.PicoVisitor)protected <T> ComponentAdapter<T> resolveAdapter(PicoContainer container, ComponentAdapter adapter, Class<T> expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
public static <T> String[] makeFoundAmbiguousStrings(Collection<ComponentAdapter<T>> found)
public static ComponentAdapter<?> findInjectorOrInstanceAdapter(ComponentAdapter<?> f)
Copyright © 2003-2014 Codehaus. All Rights Reserved.