|
JBoss Modular Service Kernel API 1.0.0.CR2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.msc.inject.RetainingInjector<T>
org.jboss.msc.inject.AddMethodInjector<T>
T
- the value typepublic final class AddMethodInjector<T>
An injector which calls an add/remove method pair on inject/uninject. Note that this class still adheres to
the contract of Injector
- namely, the same injector cannot be used to inject multiple instances into
a collection.
Constructor Summary | |
---|---|
AddMethodInjector(Value<?> target,
java.lang.reflect.Method addMethod,
java.lang.reflect.Method removeMethod)
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 org.jboss.msc.inject.RetainingInjector |
---|
getStoredValue, setStoredValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AddMethodInjector(Value<?> target, java.lang.reflect.Method addMethod, java.lang.reflect.Method removeMethod)
target
- the target upon which the add/remove methods should be invokedaddMethod
- the add methodremoveMethod
- the remove methodMethod Detail |
---|
public void inject(T value)
inject
in interface Injector<T>
inject
in class RetainingInjector<T>
value
- the valuepublic void uninject()
inject()
has been called.
uninject
in interface Injector<T>
uninject
in class RetainingInjector<T>
|
JBoss Modular Service Kernel API 1.0.0.CR2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |