GlueGen: com.jogamp.gluegen.CodeUnit Class Reference

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

Public Member Functions | Public Attributes | Protected Member Functions | List of all members
com.jogamp.gluegen.CodeUnit Class Reference

General code unit (a generated C or Java source file), covering multiple `FunctionEmitter` allowing to unify output, decoration and dynamic helper code injection per unit. More...

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

## Public Member Functions

boolean | addTailCode (final String c)
| Add a tail code to this unit. More...
void | emitln ()
void | emitln (final String s)
void | emit (final String s)
void | emitf (final String s, final Object... args)
void | emitTailCode ()
void | close ()
String | toString ()

## Public Attributes

final String | filename
final PrintWriter | output

## Protected Member Functions

| CodeUnit (final String filename, final Object generator) throws IOException

## Detailed Description

General code unit (a generated C or Java source file), covering multiple `FunctionEmitter` allowing to unify output, decoration and dynamic helper code injection per unit.

Definition at line 42 of file CodeUnit.java.

## Constructor & Destructor Documentation

## ◆ CodeUnit()

com.jogamp.gluegen.CodeUnit.CodeUnit | ( | final String | filename,
|  | final Object | generator
| ) |  | throws IOException

protected

Parameters

  filename | the class's full filename to open w/ write access
  generator | informal optional object that is creating this unit, used to be mentioned in a warning message if not null.

Exceptions

  IOException |

Definition at line 52 of file CodeUnit.java.

## Member Function Documentation

## ◆ addTailCode()

boolean com.jogamp.gluegen.CodeUnit.addTailCode | ( | final String | c | ) |

Add a tail code to this unit.

Parameters

  c | the code to be added to the tail of this code unit

Returns
  true if the `tailCode` set did not already contain the specified code `c`

Definition at line 71 of file CodeUnit.java.

Here is the caller graph for this function:

## ◆ close()

void com.jogamp.gluegen.CodeUnit.close | ( |  | ) |

Definition at line 91 of file CodeUnit.java.

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

## ◆ emit()

void com.jogamp.gluegen.CodeUnit.emit | ( | final String | s | ) |

Definition at line 81 of file CodeUnit.java.

Here is the caller graph for this function:

## ◆ emitf()

void com.jogamp.gluegen.CodeUnit.emitf | ( | final String | s,
|  | final Object... | args
| ) |  |

Definition at line 84 of file CodeUnit.java.

Here is the caller graph for this function:

## ◆ emitln() [1/2]

void com.jogamp.gluegen.CodeUnit.emitln | ( |  | ) |

Definition at line 75 of file CodeUnit.java.

Here is the caller graph for this function:

## ◆ emitln() [2/2]

void com.jogamp.gluegen.CodeUnit.emitln | ( | final String | s | ) |

Definition at line 78 of file CodeUnit.java.

## ◆ emitTailCode()

void com.jogamp.gluegen.CodeUnit.emitTailCode | ( |  | ) |

Definition at line 87 of file CodeUnit.java.

Here is the caller graph for this function:

## ◆ toString()

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

Reimplemented in com.jogamp.gluegen.CCodeUnit, and com.jogamp.gluegen.JavaCodeUnit.

Definition at line 98 of file CodeUnit.java.

## Member Data Documentation

## ◆ filename

final String com.jogamp.gluegen.CodeUnit.filename

Definition at line 43 of file CodeUnit.java.

## ◆ output

final PrintWriter com.jogamp.gluegen.CodeUnit.output

Definition at line 44 of file CodeUnit.java.

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

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