Class AbstractLazyInitializer<T> (6.50.1)

public abstract class AbstractLazyInitializer<T>

Generic AbstractLazyInitializer for any heavy-weight object that might throw an exception during initialization. The underlying object is initialized at most once.

Inheritance

java.lang.Object > AbstractLazyInitializer<T>

Type Parameter

NameDescription
T

Constructors

AbstractLazyInitializer()

public AbstractLazyInitializer()

Methods

get()

public T get()

Returns an initialized instance of T.

Returns
TypeDescription
T
Exceptions
TypeDescription
Exception

initialize()

protected abstract T initialize()

Initializes the actual object that should be returned. Is called once the first time an instance of T is required.

Returns
TypeDescription
T
Exceptions
TypeDescription
Exception