public class DefermentWriter extends Object
SourceWriter, and allows you to choose from a number of deferment
strategies; its primary use is in the core api is to enforce asynchronicity when using callbacks
during singleton injection. If a splitpoint is already loaded when you request the code,
it will immediately execute your callback.
Using deferment allows you to ensure asynchronous timing remains deterministic.| Modifier and Type | Class and Description |
|---|---|
static class |
DefermentWriter.DefermentStrategy |
| Constructor and Description |
|---|
DefermentWriter(com.google.gwt.user.rebind.SourceWriter writer)
Create a new deferment writer to inject boilerplate for pushing code into the future.
|
| Modifier and Type | Method and Description |
|---|---|
void |
printFinish()
Print the closing block of the given deferment strategy.
|
void |
printStart()
Print the opening block of the chosen deferment strategy.
|
void |
setStrategy(DefermentWriter.DefermentStrategy strategy) |
public DefermentWriter(com.google.gwt.user.rebind.SourceWriter writer)
writer - - The source writer in which to inject code.public void setStrategy(DefermentWriter.DefermentStrategy strategy)
strategy - the strategy to set. DefermentWriter.DefermentStrategypublic void printStart()
public void printFinish()
Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.