summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/JavaConfiguration.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-15 08:35:09 +0100
committerSven Gothel <[email protected]>2012-02-15 08:35:09 +0100
commit0fcc397a5f46789dad7fb8507ee164ad7b341c3c (patch)
tree53ad44338758dd21c1f0bf5f8064faeadd7ce5f1 /src/java/com/jogamp/gluegen/JavaConfiguration.java
parentca99b0ba02852c6744787112af1f0e9addd45cad (diff)
Don't ignore GlueGen.debug() in static DEBUG flags; Add JavaConfiguration.DEBUG_RENAMES
Diffstat (limited to 'src/java/com/jogamp/gluegen/JavaConfiguration.java')
-rw-r--r--src/java/com/jogamp/gluegen/JavaConfiguration.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaConfiguration.java b/src/java/com/jogamp/gluegen/JavaConfiguration.java
index 5c1121b..09364b3 100644
--- a/src/java/com/jogamp/gluegen/JavaConfiguration.java
+++ b/src/java/com/jogamp/gluegen/JavaConfiguration.java
@@ -62,6 +62,9 @@ import static com.jogamp.gluegen.JavaEmitter.EmissionStyle.*;
public class JavaConfiguration {
+ public static final boolean DEBUG_IGNORES = GlueGen.debug() || false;
+ public static final boolean DEBUG_RENAMES = GlueGen.debug() || false;
+
private int nestedReads;
private String packageName;
private String implPackageName;
@@ -632,15 +635,13 @@ public class JavaConfiguration {
return parentClass.get(className);
}
- public static final boolean DEBUG_IGNORES = false;
- public static boolean dumpedIgnores = false;
-
public void dumpIgnoresOnce() {
if(!dumpedIgnores) {
dumpedIgnores = true;
dumpIgnores();
}
}
+ private static boolean dumpedIgnores = false;
public void dumpIgnores() {
System.err.println("Extended Intf: ");
@@ -653,6 +654,14 @@ public class JavaConfiguration {
}
}
+ public void dumpRenamesOnce() {
+ if(!dumpedRenames) {
+ dumpedRenames = true;
+ dumpRenames();
+ }
+ }
+ private static boolean dumpedRenames = false;
+
public void dumpRenames() {
System.err.println("Symbol Renames: ");
for (String key : javaSymbolRenames.keySet()) {
@@ -794,11 +803,17 @@ public class JavaConfiguration {
function under the hood. Returns null if this symbol has not
been explicitly renamed. */
public String getJavaSymbolRename(String symbolName) {
+ if(DEBUG_RENAMES) {
+ dumpRenamesOnce();
+ }
return javaSymbolRenames.get(symbolName);
}
/** Programmatically adds a rename directive for the given symbol. */
public void addJavaSymbolRename(String origName, String newName) {
+ if(DEBUG_RENAMES) {
+ System.err.println("\tRename "+origName+" -> "+newName);
+ }
javaSymbolRenames.put(origName, newName);
}