org.picocontainer.injectors
Class SingleMemberInjector<T>
java.lang.Object
org.picocontainer.adapters.AbstractAdapter<T>
org.picocontainer.injectors.AbstractInjector<T>
org.picocontainer.injectors.SingleMemberInjector<T>
- All Implemented Interfaces:
- Serializable, ComponentAdapter<T>, ComponentMonitorStrategy, Injector<T>
- Direct Known Subclasses:
- ConstructorInjector, MethodInjector
public abstract class SingleMemberInjector<T>
- extends AbstractInjector<T>
Injection will happen in a single member function on the component.
- Author:
- Paul Hammant
- See Also:
- Serialized Form
Method Summary |
protected void |
boxParameters(Type[] parameterTypes)
|
protected Annotation[] |
getBindings(Annotation[][] annotationss)
|
protected Object[] |
getMemberArguments(PicoContainer container,
AccessibleObject member,
Type[] parameterTypes,
Annotation[] bindings)
|
protected Object |
getParameter(PicoContainer container,
AccessibleObject member,
int i,
Type parameterType,
Annotation binding,
Parameter currentParameter,
ComponentAdapter<?> injecteeAdapter)
|
protected Paranamer |
getParanamer()
|
protected boolean |
isNullParamAllowed(AccessibleObject member,
int i)
Checks to see if a null parameter is allowed in the given
constructor/field/method. |
protected void |
nullCheck(AccessibleObject member,
int i,
ParameterNameBinding expectedNameBinding,
Object result)
|
Methods inherited from class org.picocontainer.injectors.AbstractInjector |
accept, box, caughtIllegalAccessException, caughtIllegalAccessException, caughtInstantiationException, caughtInvocationTargetException, createDefaultParameters, decorateComponentInstance, getComponentInstance, getComponentInstance, getDescriptor, newInstance, useNames, verify |
SingleMemberInjector
public SingleMemberInjector(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
ComponentMonitor monitor,
boolean useNames)
getParanamer
protected Paranamer getParanamer()
getMemberArguments
protected Object[] getMemberArguments(PicoContainer container,
AccessibleObject member,
Type[] parameterTypes,
Annotation[] bindings)
boxParameters
protected void boxParameters(Type[] parameterTypes)
getParameter
protected Object getParameter(PicoContainer container,
AccessibleObject member,
int i,
Type parameterType,
Annotation binding,
Parameter currentParameter,
ComponentAdapter<?> injecteeAdapter)
nullCheck
protected void nullCheck(AccessibleObject member,
int i,
ParameterNameBinding expectedNameBinding,
Object result)
isNullParamAllowed
protected boolean isNullParamAllowed(AccessibleObject member,
int i)
- Checks to see if a null parameter is allowed in the given
constructor/field/method. The default version allows null
if the target object is not a primitive type.
- Parameters:
member
- constructor method or fieldi
- parameter #.
- Returns:
- true if the null parameter might be allowed.
getBindings
protected Annotation[] getBindings(Annotation[][] annotationss)
Copyright © 2003-2010 Codehaus. All Rights Reserved.