public abstract class FunctionEmitter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FunctionEmitter.EmissionModifier |
Modifier and Type | Field and Description |
---|---|
protected JavaConfiguration |
cfg |
static FunctionEmitter.EmissionModifier |
STATIC |
Constructor and Description |
---|
FunctionEmitter(FunctionEmitter arg)
Makes this FunctionEmitter a copy of the passed one.
|
FunctionEmitter(PrintWriter defaultOutput,
boolean isInterface,
JavaConfiguration configuration)
Constructs the FunctionEmitter with a CommentEmitter that emits nothing.
|
Modifier and Type | Method and Description |
---|---|
void |
addModifier(FunctionEmitter.EmissionModifier m) |
void |
addModifiers(Iterator<FunctionEmitter.EmissionModifier> mi) |
void |
clearModifiers() |
void |
emit()
Emit the function to the default output (the output that was passed to
the constructor)
|
void |
emit(PrintWriter output)
Emit the function to the specified output (instead of the default
output).
|
protected abstract int |
emitArguments(PrintWriter writer)
Returns the number of arguments emitted.
|
protected abstract void |
emitBody(PrintWriter writer) |
protected void |
emitDocComment(PrintWriter writer) |
protected int |
emitModifiers(PrintWriter writer) |
protected abstract void |
emitName(PrintWriter writer) |
protected abstract void |
emitReturnType(PrintWriter writer) |
protected void |
emitSignature(PrintWriter writer) |
protected String |
getBaseIndentString() |
CommentEmitter |
getCommentEmitter()
Get the comment emitter for this FunctionEmitter.
|
protected String |
getCommentEndString() |
protected String |
getCommentStartString() |
abstract FunctionSymbol |
getCSymbol() |
PrintWriter |
getDefaultOutput() |
abstract String |
getImplName() |
abstract String |
getInterfaceName() |
Iterator<FunctionEmitter.EmissionModifier> |
getModifiers() |
abstract String |
getNativeName() |
boolean |
hasModifier(FunctionEmitter.EmissionModifier m) |
boolean |
isInterface() |
boolean |
removeModifier(FunctionEmitter.EmissionModifier m) |
void |
setCommentEmitter(CommentEmitter cEmitter)
Set the object that will emit the comment for this function.
|
String |
toString()
Returns, as a String, whatever
emit(java.io.PrintWriter) would output. |
public static final FunctionEmitter.EmissionModifier STATIC
protected final JavaConfiguration cfg
public FunctionEmitter(PrintWriter defaultOutput, boolean isInterface, JavaConfiguration configuration)
public FunctionEmitter(FunctionEmitter arg)
public boolean isInterface()
public PrintWriter getDefaultOutput()
public void addModifiers(Iterator<FunctionEmitter.EmissionModifier> mi)
public void addModifier(FunctionEmitter.EmissionModifier m)
public boolean removeModifier(FunctionEmitter.EmissionModifier m)
public void clearModifiers()
public boolean hasModifier(FunctionEmitter.EmissionModifier m)
public Iterator<FunctionEmitter.EmissionModifier> getModifiers()
public abstract String getInterfaceName()
public abstract String getImplName()
public abstract String getNativeName()
public abstract FunctionSymbol getCSymbol()
public void emit(PrintWriter output)
public final void emit()
public String toString()
emit(java.io.PrintWriter)
would output.public void setCommentEmitter(CommentEmitter cEmitter)
public CommentEmitter getCommentEmitter()
protected void emitDocComment(PrintWriter writer)
protected void emitSignature(PrintWriter writer)
protected int emitModifiers(PrintWriter writer)
protected String getBaseIndentString()
protected String getCommentStartString()
protected String getCommentEndString()
protected abstract void emitReturnType(PrintWriter writer)
protected abstract void emitName(PrintWriter writer)
protected abstract int emitArguments(PrintWriter writer)
protected abstract void emitBody(PrintWriter writer)