aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/CompoundType.java10
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) {