summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-16 01:16:46 +0200
committerSven Gothel <[email protected]>2014-06-16 01:16:46 +0200
commitd3e2cd6432b3383d4589350d60170e02db469343 (patch)
tree89a23b6f3ccf6bd38df1da488c84ab080f80ae51 /src/java/com/jogamp/gluegen
parent65cbb89d04936df2f385d32d1649abaa4da4581c (diff)
JavaEmitter.typeToJavaType: Simplify if-else block ; JavaType.getDumpString(): Add more info ..
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r--src/java/com/jogamp/gluegen/JavaEmitter.java6
-rw-r--r--src/java/com/jogamp/gluegen/JavaType.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java
index 3f4fa9e..f37f5a3 100644
--- a/src/java/com/jogamp/gluegen/JavaEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaEmitter.java
@@ -1273,8 +1273,7 @@ public class JavaEmitter implements GlueEmitter {
return javaType(Double.TYPE);
} else if (t.isVoid()) {
return javaType(Void.TYPE);
- } else {
- if (t.pointerDepth() > 0 || t.arrayDimension() > 0) {
+ } else if (t.pointerDepth() > 0 || t.arrayDimension() > 0) {
Type targetType; // target type
if (t.isPointer()) {
// t is <type>*, we need to get <type>
@@ -1394,11 +1393,10 @@ public class JavaEmitter implements GlueEmitter {
t.arrayDimension() + " targetType=\"" + targetType + "\"]");
}
- } else {
+ } else {
throw new RuntimeException(
"Could not convert C type \"" + t + "\" (class " +
t.getClass().getName() + ") to appropriate Java type");
- }
}
}
diff --git a/src/java/com/jogamp/gluegen/JavaType.java b/src/java/com/jogamp/gluegen/JavaType.java
index 8a79559..a9e1941 100644
--- a/src/java/com/jogamp/gluegen/JavaType.java
+++ b/src/java/com/jogamp/gluegen/JavaType.java
@@ -489,7 +489,9 @@ public class JavaType {
// For debugging
public String getDumpString() {
- return "[clazz = " + clazz + " , name = " + name + " , elementType = " + elementType + " , primitivePointerType = " + primitivePointerType + "]";
+ return "[clazz = " + clazz + " , name = " + name + " , elementType = " + elementType + " , primitivePointerType = " + primitivePointerType +
+ ", isArray "+isArray()+", isArrayOfCompoundTypeWrappers "+isArrayOfCompoundTypeWrappers()+
+ ", isNIOBuffer "+isNIOBuffer()+", isNIOBufferArray "+isNIOBufferArray()+"]";
}
public void dump() {
System.err.println(getDumpString());