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.UnsatisfiableDependenciesException
ComponentAdapter.NOTHING
Modifier and Type | Field and Description |
---|---|
protected String |
prefix |
bindings, injectionMembers, injectionTypes
parameters, 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, verify
accept, box, caughtIllegalAccessException, caughtIllegalAccessException, caughtInstantiationException, caughtInvocationTargetException, createDefaultParameters, 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
public 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 null
AbstractInjector.NotConcreteRegistrationException
protected 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>
IllegalAccessException
InvocationTargetException
protected boolean isInjectorMethod(Method method)
isInjectorMethod
in class IterativeInjector<T>
protected String getInjectorPrefix()
public String getDescriptor()
ComponentAdapter
getDescriptor
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–2016 Codehaus. All rights reserved.