Class AbstractLazyInitializer<T> (6.71.0)

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

Name Description
T

Constructors

AbstractLazyInitializer()

public AbstractLazyInitializer()

Methods

get()

public T get()

Returns an initialized instance of T.

Returns
Type Description
T
Exceptions
Type Description
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
Type Description
T
Exceptions
Type Description
Exception