diff options
author | Sven Gothel <[email protected]> | 2023-06-16 01:10:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-16 01:10:46 +0200 |
commit | 0a9105dd3ebbcf4b98664e50333334bff677031c (patch) | |
tree | f88ee400fa386e6f98b1336c2428f8ebcd6a3c72 /src/java/com/jogamp/gluegen/cgram | |
parent | f1678c4ac8b85c85d11b737d08dcfe31b388e021 (diff) |
GlueGen Struct [3]: Adopt to CodeUnit Abstraction (replacing plain PrintWriter...)
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/CompoundType.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java index 56bcdda..fea2446 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java +++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java @@ -179,6 +179,16 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable return fields.get(i); } + /** Returns the <i>name</i> matching field of this type. */ + public Field getField(final String name) { + for(final Field f : fields ) { + if( f.getName().equals(name) ) { + return f; + } + } + return null; + } + /** Adds a field to this type. */ public void addField(final Field f) { if (bodyParsed) { |