aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-18 03:22:25 +0200
committerSven Gothel <[email protected]>2023-06-18 03:22:25 +0200
commit99574c6adb0aad760162fea744606345fc564472 (patch)
tree3868fe719a89d94740f76769b0b3dd03a93635d2
parent42bd110d9ec63594cc028f3ee8a459424b1d2ae0 (diff)
JavaType: Add getSignature(..) like Type
-rw-r--r--src/java/com/jogamp/gluegen/JavaType.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaType.java b/src/java/com/jogamp/gluegen/JavaType.java
index 9bcd663..2ea3b5f 100644
--- a/src/java/com/jogamp/gluegen/JavaType.java
+++ b/src/java/com/jogamp/gluegen/JavaType.java
@@ -510,10 +510,10 @@ public class JavaType {
}
sb.append(val);
}
- // For debugging
- public String getDebugString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("JType[");
+ public final StringBuilder getSignature(StringBuilder sb) {
+ if( null == sb ) {
+ sb = new StringBuilder();
+ }
boolean prepComma = false;
{
final String javaTypeName = getName();
@@ -571,7 +571,16 @@ public class JavaType {
append(sb, "C-Primitive-Pointer", prepComma); prepComma=true;
}
}
- append(sb, "], descriptor '"+getDescriptor()+"']", prepComma); prepComma=true;
+ append(sb, "], descriptor '"+getDescriptor()+"'", prepComma); prepComma=true;
+ return sb;
+ }
+
+ // For debugging
+ public String getDebugString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("JType[");
+ getSignature(sb);
+ sb.append("]");
return sb.toString();
}