Class ValueHolder<T>

  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


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

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


public ValueHolder(T value)
Method Detail


public T getValue()

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