|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
| 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.value.InjectedValue<T>
T - the value typepublic final class InjectedValue<T>

A value which is injected from another source. The value may only be read if the injector has populated it.
| Constructor Summary | |
|---|---|
InjectedValue()
Construct a new instance. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.jboss.msc.inject.RetainingInjector |
|---|
getStoredValue, inject, setStoredValue, uninject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.msc.inject.Injector |
|---|
inject, uninject |
| Constructor Detail |
|---|
public InjectedValue()
| Method Detail |
|---|
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 injected
|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||