org.jboss.msc.value
Class ProviderValue<T>
java.lang.Object
org.jboss.msc.value.ProviderValue<T>
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
- Value<T>
public final class ProviderValue<T>
- extends Object
- implements Value<T>
A value which creates an instance via a Provider
.
- Author:
- David M. Lloyd
Constructor Summary |
ProviderValue(javax.inject.Provider<T> provider)
Create a new instance. |
Method Summary |
T |
getValue()
Get the actual value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProviderValue
public ProviderValue(javax.inject.Provider<T> provider)
- Create a new instance.
- Parameters:
provider
- the provider to use
getValue
public T getValue()
throws IllegalStateException
- Get the actual value.
- Specified by:
getValue
in interface Value<T>
- Returns:
- the actual value
- Throws:
IllegalStateException
- if the value is time-sensitive and the current state does not allow retrieval.
Copyright © 2011 JBoss, a division of Red Hat, Inc.