public class SetterInjector<T> extends IterativeInjector<T>
PropertyApplicator.
Note that this class doesn't cache instances. If you want caching,
use a Cached around this one.
AbstractInjector.AmbiguousComponentResolutionException, AbstractInjector.CyclicDependencyException, AbstractInjector.NotConcreteRegistrationException, AbstractInjector.UnsatisfiableDependenciesExceptionComponentAdapter.NOTHING| Modifier and Type | Field and Description |
|---|---|
protected String |
prefix |
bindings, injectionMembers, injectionTypesparameters, verifyingGuard| Constructor and Description |
|---|
SetterInjector(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
ComponentMonitor monitor,
String prefix,
String notThisOneThough,
boolean optional,
boolean useNames)
Constructs a SetterInjector
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescriptor()
Get a string key descriptor of the component adapter for use in toString()
|
protected String |
getInjectorPrefix() |
protected Object |
injectIntoMember(AccessibleObject member,
Object componentInstance,
Object toInject) |
protected boolean |
isInjectorMethod(Method method) |
protected Object |
memberInvocationReturn(Object lastReturn,
AccessibleObject member,
Object instance) |
protected void |
unsatisfiedDependencies(PicoContainer container,
Set<Type> unsatisfiableDependencyTypes,
List<AccessibleObject> unsatisfiableDependencyMembers) |
crudeMethodSignature, decorateComponentInstance, getComponentInstance, getConstructor, getName, initializeInjectionMembersAndTypeLists, makeParameterNameImpl, verifyaccept, box, caughtIllegalAccessException, caughtIllegalAccessException, caughtInstantiationException, caughtInvocationTargetException, createDefaultParameters, getComponentInstance, newInstance, useNameschangeMonitor, checkTypeCompatibility, currentMonitor, findAdapterOfType, getComponentImplementation, getComponentKey, getDelegate, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindAdapterOfType, getComponentImplementation, getComponentKey, getDelegatepublic SetterInjector(Object componentKey, Class componentImplementation, Parameter[] parameters, ComponentMonitor monitor, String prefix, String notThisOneThough, boolean optional, boolean useNames) throws AbstractInjector.NotConcreteRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationmonitor - the component monitor used by this addAdapterprefix - the prefix to use (e.g. 'set')notThisOneThough - a setter name that's not for injecting throughoptional - not all setters need to be injecteduseNames - @throws org.picocontainer.injectors.AbstractInjector.NotConcreteRegistrationException
if the implementation is not a concrete class.NullPointerException - if one of the parameters is nullAbstractInjector.NotConcreteRegistrationExceptionprotected Object memberInvocationReturn(Object lastReturn, AccessibleObject member, Object instance)
memberInvocationReturn in class IterativeInjector<T>protected Object injectIntoMember(AccessibleObject member, Object componentInstance, Object toInject) throws IllegalAccessException, InvocationTargetException
injectIntoMember in class IterativeInjector<T>IllegalAccessExceptionInvocationTargetExceptionprotected boolean isInjectorMethod(Method method)
isInjectorMethod in class IterativeInjector<T>protected String getInjectorPrefix()
public String getDescriptor()
ComponentAdaptergetDescriptor in interface ComponentAdapter<T>getDescriptor in class AbstractInjector<T>protected void unsatisfiedDependencies(PicoContainer container, Set<Type> unsatisfiableDependencyTypes, List<AccessibleObject> unsatisfiableDependencyMembers)
unsatisfiedDependencies in class IterativeInjector<T>Copyright © 2003-2014 Codehaus. All Rights Reserved.