com.sun.tools.javac.comp.Infer.FreeTypeListener Java Examples
The following examples show how to use
com.sun.tools.javac.comp.Infer.FreeTypeListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InferenceContext.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 6 votes |
void notifyChange(List<Type> inferredVars) { InferenceException thrownEx = null; for (Map.Entry<FreeTypeListener, List<Type>> entry : new LinkedHashMap<>(freeTypeListeners).entrySet()) { if (!Type.containsAny(entry.getValue(), inferencevars.diff(inferredVars))) { try { entry.getKey().typesInferred(this); freeTypeListeners.remove(entry.getKey()); } catch (InferenceException ex) { if (thrownEx == null) { thrownEx = ex; } } } } //inference exception multiplexing - present any inference exception //thrown when processing listeners as a single one if (thrownEx != null) { throw thrownEx; } }
Example #2
Source File: InferenceContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
void notifyChange(List<Type> inferredVars) { InferenceException thrownEx = null; for (Map.Entry<FreeTypeListener, List<Type>> entry : new LinkedHashMap<>(freeTypeListeners).entrySet()) { if (!Type.containsAny(entry.getValue(), inferencevars.diff(inferredVars))) { try { entry.getKey().typesInferred(this); freeTypeListeners.remove(entry.getKey()); } catch (InferenceException ex) { if (thrownEx == null) { thrownEx = ex; } } } } //inference exception multiplexing - present any inference exception //thrown when processing listeners as a single one if (thrownEx != null) { throw thrownEx; } }
Example #3
Source File: InferenceContext.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 4 votes |
/** * Add custom hook for performing post-inference action */ void addFreeTypeListener(List<Type> types, FreeTypeListener ftl) { freeTypeListeners.put(ftl, freeVarsIn(types)); }
Example #4
Source File: InferenceContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Add custom hook for performing post-inference action */ void addFreeTypeListener(List<Type> types, FreeTypeListener ftl) { freeTypeListeners.put(ftl, freeVarsIn(types)); }