public class AccessorEmitter extends JSSubEmitter implements ISubEmitter<IAccessorNode>
| Constructor and Description |
|---|
AccessorEmitter(IJSEmitter emitter) |
| Modifier and Type | Method and Description |
|---|---|
void |
emit(IAccessorNode node)
The main emitter will call this method of the sub emitter with the
correct generic type implemented.
|
void |
emit(IClassDefinition definition) |
void |
emitGet(IGetterNode node) |
void |
emitSet(ISetterNode node) |
endMapping, getEmitter, getModel, getProject, getWalker, indentPop, indentPush, startMapping, startMapping, startMapping, write, write, writeNewline, writeNewline, writeNewline, writeNewline, writeNewline, writeToken, writeTokenpublic AccessorEmitter(IJSEmitter emitter)
public void emit(IAccessorNode node)
ISubEmitterThe 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<IAccessorNode>node - The current IASNode being emitted by the
IEmitter.public void emit(IClassDefinition definition)
public void emitGet(IGetterNode node)
public void emitSet(ISetterNode node)
Copyright © 2021 The Apache Software Foundation. All rights reserved.