Package org.jboss.msc.inject
Class MethodInjector<T>
- java.lang.Object
-
- org.jboss.msc.inject.MethodInjector<T>
-
- Type Parameters:
T
- the injection type
- All Implemented Interfaces:
Injector<T>
@Deprecated public final class MethodInjector<T> extends Object implements Injector<T>
Deprecated.UseServiceBuilder.provides(org.jboss.msc.service.ServiceName...)
method instead. This class will be removed in a future release.An injector which invokes a method. The value being injected can be specified byValues.injectedValue()
. The value being invoked upon can be specified byValues.thisValue()
.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
inject(T value)
Deprecated.Inject the given value.void
uninject()
Deprecated.Uninject the given value (in other words, cancel or undo a previous injection).
-
-
-
Constructor Detail
-
MethodInjector
public MethodInjector(Method method, Value<?> targetValue, Value<?> injectedValue, List<? extends Value<?>> parameterList)
Deprecated.Construct a new instance.- Parameters:
method
- the method to invoketargetValue
- the value of the invocation target (the object being called upon) - useValues.nullValue()
for static methodsinjectedValue
- the value to use forValues.injectedValue()
on uninjection (usuallyValues.nullValue()
)parameterList
- the list of parameter values (anynull
parameters should useValues.nullValue()
)
-
-
Method Detail
-
inject
public void inject(T value) throws InjectionException
Deprecated.Inject the given value.- Specified by:
inject
in interfaceInjector<T>
- Parameters:
value
- the value- Throws:
InjectionException
- if the injection failed
-
-