T
- the value typepublic final class AddMethodInjector<T> extends RetainingInjector<T> implements Injector<T>
Injector
- namely, the same injector cannot be used to inject multiple instances into
a collection.Constructor and Description |
---|
AddMethodInjector(Value<?> target,
java.lang.reflect.Method addMethod,
java.lang.reflect.Method removeMethod)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
inject(T value)
Inject the given value.
|
void |
uninject()
Uninject the given value (in other words, cancel or undo a previous injection).
|
getStoredValue, setStoredValue
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 methodpublic void inject(T value)
Copyright © 2012 JBoss, a division of Red Hat, Inc.