com.jogamp.gluegen

## Class FunctionEmitter

- java.lang.Object
- - com.jogamp.gluegen.FunctionEmitter

- Direct Known Subclasses:
    CMethodBindingEmitter, JavaMethodBindingEmitter

      public abstract class FunctionEmitter
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FunctionEmitter.EmissionModifier`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FunctionEmitter.EmissionModifier` | `STATIC`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FunctionEmitter(FunctionEmitter arg)` Makes this FunctionEmitter a copy of the passed one.
    `FunctionEmitter(PrintWriter defaultOutput, boolean isInterface)` Constructs the FunctionEmitter with a CommentEmitter that emits nothing.

  - ### Method Summary

    Methods
    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()`
    `PrintWriter` | `getDefaultOutput()`
    `Iterator<FunctionEmitter.EmissionModifier>` | `getModifiers()`
    `abstract String` | `getName()`
    `boolean` | `hasModifier(FunctionEmitter.EmissionModifier m)`
    `protected boolean` | `isBaseTypeConst(Type type)` Checks the base type of pointer-to-pointer, pointer, array or plain for const-ness.
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### STATIC

          public static final FunctionEmitter.EmissionModifier STATIC

  - ### Constructor Detail

    - #### FunctionEmitter

          public FunctionEmitter(PrintWriter defaultOutput,
                         boolean isInterface)

      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()

    - #### isBaseTypeConst

          protected final boolean isBaseTypeConst(Type type)

      Checks the base type of pointer-to-pointer, pointer, array or plain for const-ness.

      Note: Implementation walks down to the base type and returns it's const-ness. Intermediate 'const' qualifier are not considered, e.g. const pointer.

    - #### getDefaultOutput

          public PrintWriter getDefaultOutput()

    - #### addModifiers

          public void addModifiers(Iterator<FunctionEmitter.EmissionModifier> mi)

    - #### addModifier

          public void addModifier(FunctionEmitter.EmissionModifier m)

    - #### removeModifier

          public boolean removeModifier(FunctionEmitter.EmissionModifier m)

    - #### clearModifiers

          public void clearModifiers()

    - #### hasModifier

          public boolean hasModifier(FunctionEmitter.EmissionModifier m)

    - #### getModifiers

          public Iterator<FunctionEmitter.EmissionModifier> getModifiers()

    - #### getName

          public abstract String getName()

    - #### 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)

    - #### toString

          public String toString()

      Returns, as a String, whatever `emit(java.io.PrintWriter)` would output.
      Overrides:
        `toString` in class `Object`

    - #### 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)