T
- the injection typepublic final class MethodInjector<T> extends java.lang.Object implements Injector<T>
Values.injectedValue()
. The
value being invoked upon can be specified by Values.thisValue()
.Constructor and Description |
---|
MethodInjector(java.lang.reflect.Method method,
Value<?> targetValue,
Value<?> injectedValue,
java.util.List<? extends Value<?>> parameterList)
Construct a new instance.
|
public MethodInjector(java.lang.reflect.Method method, Value<?> targetValue, Value<?> injectedValue, java.util.List<? extends Value<?>> parameterList)
method
- the method to invoketargetValue
- the value of the invocation target (the object being called upon) - use Values.nullValue()
for static methodsinjectedValue
- the value to use for Values.injectedValue()
on uninjection (usually Values.nullValue()
)parameterList
- the list of parameter values (any null
parameters should use Values.nullValue()
)public void inject(T value) throws InjectionException
inject
in interface Injector<T>
value
- the valueInjectionException
- if the injection failedCopyright © 2011 JBoss, a division of Red Hat, Inc.