GlueGen: src/junit/com/jogamp/gluegen/test/junit/structgen/BuildStruct01.java Source File

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

BuildStruct01.java
Go to the documentation of this file.
1 package com.jogamp.gluegen.test.junit.structgen;
2
3import com.jogamp.gluegen.structgen.CStruct;
4
5/**
6 * Class simply triggering CStruct annotation processor to generate the types 'RenderingConfig' etc.
7 * <p>
8 * Due to Java8 issues, see Bug 923,
9 * using {@link package-info} is more elegant to kick-off the annotation processor.
10 * </p>
11 */
12 public class BuildStruct01 {
13
14 // APT is only triggered for fields,
15 // hence we use unused fields in this unit test!
16
17 // @CStruct(name="RenderingConfig", header="TestStruct01.h")
18 // MyRenderingConfig config;
19
20 // @CStruct(header="TestStruct01.h")
21 // MyRenderingConfig config;
22
23 /**
24 * Java8: We cannot use type 'RenderingConfig' yet (bug?) even if not compiling.
25 * Hence we force the type-name via 'jname' and use a dummy variable!
26 */
27 @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h")
28 boolean dummy1;
29
30 @CStruct(name="Pixel", jname="Pixel", header="TestStruct02.h")
31 boolean dummy2;
32
33 public static void initSingleton() {}
34}
com.jogamp.gluegen.test.junit.structgen.BuildStruct01
Class simply triggering CStruct annotation processor to generate the types 'RenderingConfig' etc.
Definition: BuildStruct01.java:12
com.jogamp.gluegen.test.junit.structgen.BuildStruct01.initSingleton
static void initSingleton()
Definition: BuildStruct01.java:33
com.jogamp.gluegen.structgen.CStruct
Definition: CStruct.java:40