GlueGen: com.jogamp.gluegen.FunctionEmitter Class Reference

GlueGen v2.6.0 GlueGen, Native Binding Generator for Java™ (public API).

Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
com.jogamp.gluegen.FunctionEmitter Class Referenceabstract

Generic function emitter to produce C (JNI) or Java code stubs to its `CodeUnit`, invoking a native function as described via `MethodBinding`. More...

Inheritance diagram for com.jogamp.gluegen.FunctionEmitter:
Collaboration diagram for com.jogamp.gluegen.FunctionEmitter:

## Classes

class | EmissionModifier

## Public Member Functions

| FunctionEmitter (final MethodBinding binding, final CodeUnit unit, final boolean isInterface, final JavaConfiguration configuration)
| Constructs the FunctionEmitter with a CommentEmitter that emits nothing. More...
| FunctionEmitter (final FunctionEmitter arg)
| Makes this FunctionEmitter a copy of the passed one. More...
final boolean | isInterface ()
final MethodBinding | getBinding ()
final CodeUnit | getUnit ()
void | addModifiers (final Iterator< EmissionModifier > mi)
void | addModifier (final EmissionModifier m)
boolean | removeModifier (final EmissionModifier m)
void | clearModifiers ()
boolean | hasModifier (final EmissionModifier m)
Iterator< EmissionModifier > | getModifiers ()
abstract String | getInterfaceName ()
abstract String | getImplName ()
abstract String | getNativeName ()
abstract FunctionSymbol | getCSymbol ()
final void | emit ()
| Emit the function to the `getUnit()`. More...
String | toString ()
void | setCommentEmitter (final CommentEmitter cEmitter)
| Set the object that will emit the comment for this function. More...
CommentEmitter | getCommentEmitter ()
| Get the comment emitter for this FunctionEmitter. More...

## Static Public Attributes

static final EmissionModifier | STATIC = new EmissionModifier("static")

## Protected Member Functions

void | emitAdditionalCode ()
void | emitDocComment ()
final void | emitSignature ()
StringBuilder | appendSignature (final StringBuilder buf)
final int | emitModifiers ()
int | appendModifiers (final StringBuilder buf)
String | getBaseIndentString ()
String | getCommentStartString ()
String | getCommentEndString ()
final void | emitReturnType ()
abstract StringBuilder | appendReturnType (StringBuilder buf)
final void | emitName ()
abstract StringBuilder | appendName (StringBuilder buf)
final int | emitArguments ()
| Returns the number of arguments emitted. More...
abstract int | appendArguments (StringBuilder buf)
| Returns the number of arguments emitted. More...
abstract void | emitBody ()

## Protected Attributes

final MethodBinding | binding
final CodeUnit | unit
final JavaConfiguration | cfg

## Detailed Description

Generic function emitter to produce C (JNI) or Java code stubs to its `CodeUnit`, invoking a native function as described via `MethodBinding`.

Definition at line 51 of file FunctionEmitter.java.

## Constructor & Destructor Documentation

## ◆ FunctionEmitter() [1/2]

com.jogamp.gluegen.FunctionEmitter.FunctionEmitter | ( | final MethodBinding | binding,
|  | final CodeUnit | unit,
|  | final boolean | isInterface,
|  | final JavaConfiguration | configuration
| ) |  |

Constructs the FunctionEmitter with a CommentEmitter that emits nothing.

Definition at line 66 of file FunctionEmitter.java.

## ◆ FunctionEmitter() [2/2]

com.jogamp.gluegen.FunctionEmitter.FunctionEmitter | ( | final FunctionEmitter | arg | ) |

Makes this FunctionEmitter a copy of the passed one.

Definition at line 78 of file FunctionEmitter.java.

## Member Function Documentation

## ◆ addModifier()

void com.jogamp.gluegen.FunctionEmitter.addModifier | ( | final EmissionModifier | m | ) |

Definition at line 97 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ addModifiers()

void com.jogamp.gluegen.FunctionEmitter.addModifiers | ( | final Iterator< EmissionModifier > | mi | ) |

Definition at line 92 of file FunctionEmitter.java.

## ◆ appendArguments()

abstract int com.jogamp.gluegen.FunctionEmitter.appendArguments | ( | StringBuilder | buf | ) |

abstractprotected

Returns the number of arguments emitted.

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, com.jogamp.gluegen.JavaMethodBindingEmitter, com.jogamp.gluegen.procaddress.ProcAddressCMethodBindingEmitter, and com.jogamp.gluegen.procaddress.ProcAddressJavaMethodBindingEmitter.

Here is the caller graph for this function:

## ◆ appendModifiers()

int com.jogamp.gluegen.FunctionEmitter.appendModifiers | ( | final StringBuilder | buf | ) |

protected

Definition at line 188 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ appendName()

abstract StringBuilder com.jogamp.gluegen.FunctionEmitter.appendName | ( | StringBuilder | buf | ) |

abstractprotected

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

Here is the caller graph for this function:

## ◆ appendReturnType()

abstract StringBuilder com.jogamp.gluegen.FunctionEmitter.appendReturnType | ( | StringBuilder | buf | ) |

abstractprotected

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

Here is the caller graph for this function:

## ◆ appendSignature()

StringBuilder com.jogamp.gluegen.FunctionEmitter.appendSignature | ( | final StringBuilder | buf | ) |

protected

Definition at line 163 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ clearModifiers()

void com.jogamp.gluegen.FunctionEmitter.clearModifiers | ( |  | ) |

Definition at line 101 of file FunctionEmitter.java.

## ◆ emit()

final void com.jogamp.gluegen.FunctionEmitter.emit | ( |  | ) |

Emit the function to the `getUnit()`.

Definition at line 116 of file FunctionEmitter.java.

Here is the call graph for this function:

## ◆ emitAdditionalCode()

void com.jogamp.gluegen.FunctionEmitter.emitAdditionalCode | ( |  | ) |

protected

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

Definition at line 143 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ emitArguments()

final int com.jogamp.gluegen.FunctionEmitter.emitArguments | ( |  | ) |

protected

Returns the number of arguments emitted.

Definition at line 214 of file FunctionEmitter.java.

Here is the call graph for this function:

## ◆ emitBody()

abstract void com.jogamp.gluegen.FunctionEmitter.emitBody | ( |  | ) |

abstractprotected

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

Here is the caller graph for this function:

## ◆ emitDocComment()

void com.jogamp.gluegen.FunctionEmitter.emitDocComment | ( |  | ) |

protected

Definition at line 144 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ emitModifiers()

final int com.jogamp.gluegen.FunctionEmitter.emitModifiers | ( |  | ) |

protected

Definition at line 182 of file FunctionEmitter.java.

Here is the call graph for this function:

## ◆ emitName()

final void com.jogamp.gluegen.FunctionEmitter.emitName | ( |  | ) |

protected

Definition at line 209 of file FunctionEmitter.java.

Here is the call graph for this function:

## ◆ emitReturnType()

final void com.jogamp.gluegen.FunctionEmitter.emitReturnType | ( |  | ) |

protected

Definition at line 205 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ emitSignature()

final void com.jogamp.gluegen.FunctionEmitter.emitSignature | ( |  | ) |

protected

Definition at line 159 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getBaseIndentString()

String com.jogamp.gluegen.FunctionEmitter.getBaseIndentString | ( |  | ) |

protected

Reimplemented in com.jogamp.gluegen.JavaMethodBindingEmitter.

Definition at line 200 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ getBinding()

final MethodBinding com.jogamp.gluegen.FunctionEmitter.getBinding | ( |  | ) |

Definition at line 89 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ getCommentEmitter()

CommentEmitter com.jogamp.gluegen.FunctionEmitter.getCommentEmitter | ( |  | ) |

Get the comment emitter for this FunctionEmitter.

The return value may be null, in which case no comment emitter has been set.

Definition at line 141 of file FunctionEmitter.java.

## ◆ getCommentEndString()

String com.jogamp.gluegen.FunctionEmitter.getCommentEndString | ( |  | ) |

protected

Reimplemented in com.jogamp.gluegen.JavaMethodBindingEmitter.

Definition at line 203 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ getCommentStartString()

String com.jogamp.gluegen.FunctionEmitter.getCommentStartString | ( |  | ) |

protected

Reimplemented in com.jogamp.gluegen.JavaMethodBindingEmitter.

Definition at line 202 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ getCSymbol()

abstract FunctionSymbol com.jogamp.gluegen.FunctionEmitter.getCSymbol | ( |  | ) |

abstract

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

## ◆ getImplName()

abstract String com.jogamp.gluegen.FunctionEmitter.getImplName | ( |  | ) |

abstract

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, com.jogamp.gluegen.JavaMethodBindingEmitter, and com.jogamp.gluegen.procaddress.ProcAddressJavaMethodBindingEmitter.

## ◆ getInterfaceName()

abstract String com.jogamp.gluegen.FunctionEmitter.getInterfaceName | ( |  | ) |

abstract

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

## ◆ getModifiers()

Iterator< EmissionModifier > com.jogamp.gluegen.FunctionEmitter.getModifiers | ( |  | ) |

Definition at line 105 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ getNativeName()

abstract String com.jogamp.gluegen.FunctionEmitter.getNativeName | ( |  | ) |

abstract

Reimplemented in com.jogamp.gluegen.CMethodBindingEmitter, and com.jogamp.gluegen.JavaMethodBindingEmitter.

## ◆ getUnit()

final CodeUnit com.jogamp.gluegen.FunctionEmitter.getUnit | ( |  | ) |

Definition at line 90 of file FunctionEmitter.java.

## ◆ hasModifier()

boolean com.jogamp.gluegen.FunctionEmitter.hasModifier | ( | final EmissionModifier | m | ) |

Definition at line 103 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ isInterface()

final boolean com.jogamp.gluegen.FunctionEmitter.isInterface | ( |  | ) |

Definition at line 87 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ removeModifier()

boolean com.jogamp.gluegen.FunctionEmitter.removeModifier | ( | final EmissionModifier | m | ) |

Definition at line 99 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ setCommentEmitter()

void com.jogamp.gluegen.FunctionEmitter.setCommentEmitter | ( | final CommentEmitter | cEmitter | ) |

Set the object that will emit the comment for this function.

If the parameter is null, no comment will be emitted.

Definition at line 133 of file FunctionEmitter.java.

Here is the caller graph for this function:

## ◆ toString()

String com.jogamp.gluegen.FunctionEmitter.toString | ( |  | ) |

Definition at line 125 of file FunctionEmitter.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## ◆ binding

final MethodBinding com.jogamp.gluegen.FunctionEmitter.binding

protected

Definition at line 58 of file FunctionEmitter.java.

## ◆ cfg

final JavaConfiguration com.jogamp.gluegen.FunctionEmitter.cfg

protected

Definition at line 61 of file FunctionEmitter.java.

## ◆ STATIC

final EmissionModifier com.jogamp.gluegen.FunctionEmitter.STATIC = new EmissionModifier("static")

static

Definition at line 53 of file FunctionEmitter.java.

## ◆ unit

final CodeUnit com.jogamp.gluegen.FunctionEmitter.unit

protected

Definition at line 59 of file FunctionEmitter.java.

The documentation for this class was generated from the following file:

- src/java/com/jogamp/gluegen/FunctionEmitter.java