public static class SimpleNamedBindingAnnotationTestCase.FieldInjector<T> extends AbstractInjector<T>
AbstractInjector.AmbiguousComponentResolutionException, AbstractInjector.CyclicDependencyException, AbstractInjector.NotConcreteRegistrationException, AbstractInjector.UnsatisfiableDependenciesException
ComponentAdapter.NOTHING
parameters, verifyingGuard
Modifier | Constructor and Description |
---|---|
protected |
FieldInjector(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
ComponentMonitor monitor,
boolean useNames) |
Modifier and Type | Method and Description |
---|---|
T |
getComponentInstance(PicoContainer container,
Type into)
Retrieve the component instance.
|
String |
getDescriptor()
Get a string key descriptor of the component adapter for use in toString()
|
void |
verify(PicoContainer container)
Verify that all dependencies for this adapter can be satisfied.
|
accept, box, caughtIllegalAccessException, caughtIllegalAccessException, caughtInstantiationException, caughtInvocationTargetException, createDefaultParameters, decorateComponentInstance, getComponentInstance, newInstance, useNames
changeMonitor, checkTypeCompatibility, currentMonitor, findAdapterOfType, getComponentImplementation, getComponentKey, getDelegate, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findAdapterOfType, getComponentImplementation, getComponentKey, getDelegate
protected FieldInjector(Object componentKey, Class componentImplementation, Parameter[] parameters, ComponentMonitor monitor, boolean useNames)
public void verify(PicoContainer container) throws PicoCompositionException
ComponentAdapter
verify
in interface ComponentAdapter<T>
verify
in class AbstractInjector<T>
container
- the PicoContainer
, that is used to resolve any possible dependencies of the instance.PicoCompositionException
- if one or more dependencies cannot be resolved.public T getComponentInstance(PicoContainer container, Type into) throws PicoCompositionException
ComponentAdapter
Cached
will always return the
same instance.getComponentInstance
in interface ComponentAdapter<T>
getComponentInstance
in class AbstractInjector<T>
container
- the PicoContainer
, that is used to resolve any possible dependencies of the instance.into
- the class that is about to be injected into. Use ComponentAdapter.NOTHING.class if this is not important to you.PicoCompositionException
- if the component has dependencies which could not be resolved, or
instantiation of the component lead to an ambiguous situation within the
container.public String getDescriptor()
ComponentAdapter
getDescriptor
in interface ComponentAdapter<T>
getDescriptor
in class AbstractInjector<T>
Copyright © 2003–2015 Codehaus. All rights reserved.