Package org.hibernate.internal.util
Class ValueHolder<T>
- java.lang.Object
-
- org.hibernate.internal.util.ValueHolder<T>
-
public class ValueHolder<T> extends Object
Represents a "final" value that is initialized eitherup front
or once at some point after declaration. Note: If a Serializable class has aValueHolder
property, that property should be declared transient!
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ValueHolder.DeferredInitializer<T>
The snippet that generates the initialization value.
-
Constructor Summary
Constructors Constructor Description ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
Instantiates aValueHolder
with the specified initializer.ValueHolder(T value)
-
-
-
Constructor Detail
-
ValueHolder
public ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
Instantiates aValueHolder
with the specified initializer.- Parameters:
valueInitializer
- The initializer to use ingetValue()
when value not yet known.
-
ValueHolder
public ValueHolder(T value)
-
-
Method Detail
-
getValue
public T getValue()
-
-