|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.msc.inject.MethodInjector<T>
T - the injection typepublic final class MethodInjector<T>
An injector which invokes a method. The value being injected can be specified by Values.injectedValue(). The
value being invoked upon can be specified by Values.thisValue().
| Constructor Summary | |
|---|---|
MethodInjector(Method method,
Value<?> targetValue,
Value<?> injectedValue,
List<? extends Value<?>> parameterList)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
inject(T value)
Inject the given value. |
void |
uninject()
Uninject the given value (in other words, cancel or undo a previous injection). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodInjector(Method method,
Value<?> targetValue,
Value<?> injectedValue,
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())| Method Detail |
|---|
public void inject(T value)
throws InjectionException
inject in interface Injector<T>value - the value
InjectionException - if the injection failedpublic void uninject()
inject()
has been called.
uninject in interface Injector<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||