diff options
author | sg215889 <[email protected]> | 2009-07-29 05:15:45 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-29 05:15:45 -0700 |
commit | e9468e9aa2bd6d893bb1e0b9058da0ee9a824576 (patch) | |
tree | 2f818915f1b7b372bd7f23eb7c21b0b134216570 /src/java | |
parent | 13da2583621ed3c803e8625aa85b474276966ef3 (diff) |
ExtendedInterfaceSymbols -> ExtendedInterfaceSymbolsIgnore; Allow cobination of ExtendedInterfaceSymbolsIgnore and ExtendedInterfaceSymbolsOnly
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/sun/gluegen/JavaConfiguration.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java index 5693150..a1fe732 100644 --- a/src/java/com/sun/gluegen/JavaConfiguration.java +++ b/src/java/com/sun/gluegen/JavaConfiguration.java @@ -117,8 +117,8 @@ public class JavaConfiguration { * converted to String args; value is List of Integer argument indices */ private Map/*<String,List<Integer>>*/ argumentsAreString = new HashMap(); - private Set/*<String>*/ extendedIntfSymbols = new HashSet(); - private boolean extendedIntfSymbolsOnly=false; + private Set/*<String>*/ extendedIntfSymbolsIgnore = new HashSet(); + private Set/*<String>*/ extendedIntfSymbolsOnly = new HashSet(); private Set/*<Pattern>*/ ignores = new HashSet(); private Map/*<String,Pattern>*/ ignoreMap = new HashMap(); private Set/*<Pattern>*/ ignoreNots = new HashSet(); @@ -577,10 +577,6 @@ public class JavaConfiguration { return (String) parentClass.get(className); } - public boolean extendedIntfSymbolsOnly() { - return extendedIntfSymbolsOnly; - } - public static final boolean DEBUG_IGNORES = false; public static boolean dumpedIgnores = false; @@ -593,7 +589,7 @@ public class JavaConfiguration { public void dumpIgnores() { System.err.println("Extended Intf: "); - for (Iterator iter = extendedIntfSymbols.iterator(); iter.hasNext(); ) { + for (Iterator iter = extendedIntfSymbolsIgnore.iterator(); iter.hasNext(); ) { System.err.println("\t"+(String)iter.next()); } System.err.println("Ignores (All): "); @@ -609,7 +605,7 @@ public class JavaConfiguration { dumpIgnoresOnce(); } // Simple case; the entire symbol is in the interface ignore table. - if (extendedIntfSymbols.contains(symbol)) { + if (extendedIntfSymbolsIgnore.contains(symbol)) { if(DEBUG_IGNORES) { System.err.println("Ignore Intf: "+symbol); } @@ -628,8 +624,8 @@ public class JavaConfiguration { dumpIgnoresOnce(); } - if (extendedIntfSymbolsOnly) { - if(!extendedIntfSymbols.contains(symbol)) { + if (!extendedIntfSymbolsOnly.isEmpty()) { + if(!extendedIntfSymbolsOnly.contains(symbol)) { if(DEBUG_IGNORES) { System.err.println("Ignore Impl !extended: " + symbol); } @@ -849,11 +845,10 @@ public class JavaConfiguration { // because ReturnedArrayLength changes them. } else if (cmd.equalsIgnoreCase("ArgumentIsString")) { readArgumentIsString(tok, filename, lineNo); - } else if (cmd.equalsIgnoreCase("ExtendedInterfaceSymbols")) { - readExtendedInterfaceSymbols(tok, filename, lineNo); + } else if (cmd.equalsIgnoreCase("ExtendedInterfaceSymbolsIgnore")) { + readExtendedInterfaceSymbols(tok, filename, lineNo, false); } else if (cmd.equalsIgnoreCase("ExtendedInterfaceSymbolsOnly")) { - extendedIntfSymbolsOnly=true; - readExtendedInterfaceSymbols(tok, filename, lineNo); + readExtendedInterfaceSymbols(tok, filename, lineNo, true); } else if (cmd.equalsIgnoreCase("Ignore")) { readIgnore(tok, filename, lineNo); } else if (cmd.equalsIgnoreCase("Unignore")) { @@ -1056,7 +1051,7 @@ public class JavaConfiguration { } } - protected void readExtendedInterfaceSymbols(StringTokenizer tok, String filename, int lineNo) { + protected void readExtendedInterfaceSymbols(StringTokenizer tok, String filename, int lineNo, boolean onlyList) { File javaFile; BufferedReader javaReader; try { @@ -1080,8 +1075,13 @@ public class JavaConfiguration { return; } - extendedIntfSymbols.addAll(parser.getParsedEnumNames()); - extendedIntfSymbols.addAll(parser.getParsedFunctionNames()); + if(onlyList) { + extendedIntfSymbolsOnly.addAll(parser.getParsedEnumNames()); + extendedIntfSymbolsOnly.addAll(parser.getParsedFunctionNames()); + } else { + extendedIntfSymbolsIgnore.addAll(parser.getParsedEnumNames()); + extendedIntfSymbolsIgnore.addAll(parser.getParsedFunctionNames()); + } } protected void readIgnore(StringTokenizer tok, String filename, int lineNo) { |