Class FunctionEmitter

    • Constructor Detail

      • FunctionEmitter

        public FunctionEmitter​(PrintWriter defaultOutput,
                               boolean isInterface,
                               JavaConfiguration configuration)
        Constructs the FunctionEmitter with a CommentEmitter that emits nothing.
      • FunctionEmitter

        public FunctionEmitter​(FunctionEmitter arg)
        Makes this FunctionEmitter a copy of the passed one.
    • Method Detail

      • isInterface

        public boolean isInterface()
      • getDefaultOutput

        public PrintWriter getDefaultOutput()
      • clearModifiers

        public void clearModifiers()
      • getInterfaceName

        public abstract String getInterfaceName()
      • getImplName

        public abstract String getImplName()
      • getNativeName

        public abstract String getNativeName()
      • emit

        public void emit​(PrintWriter output)
        Emit the function to the specified output (instead of the default output).
      • emit

        public final void emit()
        Emit the function to the default output (the output that was passed to the constructor)
      • setCommentEmitter

        public void setCommentEmitter​(CommentEmitter cEmitter)
        Set the object that will emit the comment for this function. If the parameter is null, no comment will be emitted.
      • getCommentEmitter

        public CommentEmitter getCommentEmitter()
        Get the comment emitter for this FunctionEmitter. The return value may be null, in which case no comment emitter has been set.
      • emitDocComment

        protected void emitDocComment​(PrintWriter writer)
      • emitSignature

        protected void emitSignature​(PrintWriter writer)
      • emitModifiers

        protected int emitModifiers​(PrintWriter writer)
      • getBaseIndentString

        protected String getBaseIndentString()
      • getCommentStartString

        protected String getCommentStartString()
      • getCommentEndString

        protected String getCommentEndString()
      • emitReturnType

        protected abstract void emitReturnType​(PrintWriter writer)
      • emitName

        protected abstract void emitName​(PrintWriter writer)
      • emitArguments

        protected abstract int emitArguments​(PrintWriter writer)
        Returns the number of arguments emitted.
      • emitBody

        protected abstract void emitBody​(PrintWriter writer)