T - the value typepublic final class InjectedValue<T> extends RetainingInjector<T> implements Injector<T>, Value<T>
| Constructor and Description |
|---|
InjectedValue()
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getOptionalValue()
Get the value if it was injected, or return
null if it was not. |
T |
getValue()
Get the actual value.
|
void |
setValue(Value<T> value)
Set the value to be injected to a
Value instance. |
getStoredValue, inject, setStoredValue, uninjectpublic T getValue() throws IllegalStateException
getValue in interface Value<T>IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.public void setValue(Value<T> value)
Value instance.value - the value to set, cannot be null (though it may be Values.nullValue())public T getOptionalValue()
null if it was not.null if it was not injectedCopyright © 2017 JBoss by Red Hat. All rights reserved.