org.hibernate.internal.util
Class ValueHolder<T>

java.lang.Object
  extended by org.hibernate.internal.util.ValueHolder<T>

public class ValueHolder<T>
extends Object

Represents a "final" value that is initialized either up front or once at some point after declaration. Note: If a Serializable class has a ValueHolder property, that property should be declared transient!


Nested Class Summary
static interface ValueHolder.DeferredInitializer<T>
          The snippet that generates the initialization value.
 
Constructor Summary
ValueHolder(T value)
           
ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
          Instantiates a ValueHolder with the specified initializer.
 
Method Summary
 T getValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueHolder

public ValueHolder(ValueHolder.DeferredInitializer<T> valueInitializer)
Instantiates a ValueHolder with the specified initializer.

Parameters:
valueInitializer - The initializer to use in getValue() when value not yet known.

ValueHolder

public ValueHolder(T value)
Method Detail

getValue

public T getValue()


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.