- All Known Implementing Classes:
public interface ThunkCreatorA thunk is a delayed calculation. In Java and Tapestry terms, a Thunk is a proxy object of a particular interface that delegates all methods to an object of the same type obtained from an
ObjectProvider. This is used by
LazyAdvisorto build lazy thunk proxies.
<T> T createThunk(Class<T> proxyType, ObjectCreator objectCreator, String description)Creates a Thunk of the given proxy type.
- Type Parameters:
T- type of thunk
proxyType- type of object to create (must be an interface)
objectCreator- provides an instance of the same type on demand (may be invoked multiple times)
description- to be returned from the thunk's toString() method
- thunk of given type