public class LazyInitializerDecorator<T> extends LazyInitializer<T> implements ObjectDecorator<LazyInitializer<T>>
LazyInitializer.| Constructor and Description |
|---|
LazyInitializerDecorator(LazyInitializer<T> decorated) |
| Modifier and Type | Method and Description |
|---|---|
LazyInitializer<T> |
getDecoratedObject() |
LazyInitializer<T> |
getOriginalDecoratedObject() |
protected T |
initialize()
Creates and initializes the object managed by this
LazyInitializer. |
get, isInitializedpublic LazyInitializerDecorator(LazyInitializer<T> decorated)
protected T initialize()
LazyInitializerLazyInitializer. This method is called by LazyInitializer.get()
when the object is accessed for the first time. An implementation can focus on the creation of the object. No
synchronization is needed, as this is already handled by get().initialize in class LazyInitializer<T>public LazyInitializer<T> getDecoratedObject()
getDecoratedObject in interface ObjectDecorator<LazyInitializer<T>>public LazyInitializer<T> getOriginalDecoratedObject()
getOriginalDecoratedObject in interface ObjectDecorator<LazyInitializer<T>>Copyright © 2008-2014. All Rights Reserved.