public class BindableEmitter extends JSSubEmitter implements ISubEmitter<IClassDefinition>
Modifier and Type | Field and Description |
---|---|
static String |
BINDABLE_DISPATCHER_NAME |
static String |
DISPATCHER_CLASS_QNAME |
static String |
DISPATCHER_INTERFACE_QNAME |
static String |
EVENT |
static String |
EVENT_QNAME |
static String |
EVENTDISPATCHER |
static String |
EVENTDISPATCHER_INTERFACE |
static String |
EVENTS_PACKAGE |
static String |
STATIC_DISPATCHER_GETTER |
static String |
VALUECHANGE_EVENT |
static String |
VALUECHANGE_EVENT_QNAME |
Constructor and Description |
---|
BindableEmitter(IJSEmitter emitter) |
Modifier and Type | Method and Description |
---|---|
protected String |
convertASTypeToJS(String qname)
temp
todo : figure out easy access to JSGoogDocEmitter for emitType
for now, the following is copied (simplified) from JSGoogDocEmitter
|
void |
emit(IClassDefinition definition)
The main emitter will call this method of the sub emitter with the
correct generic type implemented.
|
void |
emitBindableExtendsConstructorCode(String qname,
boolean popIndent) |
void |
emitBindableImplementsConstructorCode() |
void |
emitBindableImplementsConstructorCode(boolean popIndent) |
endMapping, getEmitter, getModel, getProject, getWalker, indentPop, indentPush, startMapping, startMapping, startMapping, write, write, writeNewline, writeNewline, writeNewline, writeNewline, writeNewline, writeToken, writeToken
public static String BINDABLE_DISPATCHER_NAME
public static String STATIC_DISPATCHER_GETTER
public static String EVENTS_PACKAGE
public static String EVENTDISPATCHER
public static String EVENTDISPATCHER_INTERFACE
public static String EVENT
public static String VALUECHANGE_EVENT
public static String EVENT_QNAME
public static String VALUECHANGE_EVENT_QNAME
public static String DISPATCHER_CLASS_QNAME
public static String DISPATCHER_INTERFACE_QNAME
public BindableEmitter(IJSEmitter emitter)
public void emit(IClassDefinition definition)
ISubEmitter
The main idea here is abstraction. Producing JavaScript can get complicated, the best way to avoid bugs is to avoid as much state and interdependence between emit() calls of the main emitter.
emit
in interface ISubEmitter<IClassDefinition>
definition
- The current IASNode
being emitted by the
IEmitter
.public void emitBindableImplementsConstructorCode()
public void emitBindableImplementsConstructorCode(boolean popIndent)
public void emitBindableExtendsConstructorCode(String qname, boolean popIndent)
Copyright © 2016 The Apache Software Foundation. All rights reserved.