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>
public final class MethodInjector<T>
- extends Object
- implements Injector<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()
.
- Author:
- David M. Lloyd
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 |
MethodInjector
public MethodInjector(Value<Method> methodValue,
Value<?> targetValue,
Value<?> injectedValue,
List<? extends Value<?>> parameterList)
inject
public void inject(T value)
throws InjectionException
- Description copied from interface:
Injector
- Inject the given value.
- Specified by:
inject
in interface Injector<T>
- Parameters:
value
- the value
- Throws:
InjectionException
- if the injection failed
uninject
public void uninject()
- Description copied from interface:
Injector
- Uninject the given value (in other words, cancel or undo a previous injection). Only called after
inject()
has been called.
- Specified by:
uninject
in interface Injector<T>
Copyright © 2010 JBoss, a division of Red Hat, Inc.