T
- the value typeServiceBuilder.requires(org.jboss.msc.service.ServiceName)
method instead. This class will be removed in a future release.@Deprecated public final class InjectedValue<T> extends RetainingInjector<T> implements Injector<T>, Value<T>
Constructor and Description |
---|
InjectedValue()
Deprecated.
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
T |
getOptionalValue()
Deprecated.
Get the value if it was injected, or return
null if it was not. |
T |
getValue()
Deprecated.
Get the actual dependency value.
|
void |
setValue(Value<T> value)
Deprecated.
Set the value to be injected to a
Value instance. |
getStoredValue, inject, setStoredValue, uninject
public 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 © 2021 JBoss by Red Hat. All rights reserved.