List of usage examples for com.google.gwt.dev.util.collect Maps put
public static <K, V> Map<K, V> put(Map<K, V> map, K key, V value)
From source file:com.googlecode.gwt.test.internal.rewrite.RewriteSingleJsoImplDispatches.java
License:Apache License
private Set<String> computeAllInterfaces(String intfName) { Set<String> toReturn = intfNamesToAllInterfaces.get(intfName); if (toReturn != null) { return toReturn; }//from w w w . j a v a 2 s . c o m toReturn = Sets.create(); List<JClassType> q = new LinkedList<JClassType>(); JClassType intf = typeOracle.findType(intfName.replace('/', '.').replace('$', '.')); /* * If the interface's compilation unit wasn't retained due to an error, then it won't be * available in the typeOracle for us to rewrite */ if (intf != null) { q.add(intf); } while (!q.isEmpty()) { intf = q.remove(0); String resourceName = getResourceName(intf); if (!toReturn.contains(resourceName)) { toReturn = Sets.add(toReturn, resourceName); Collections.addAll(q, intf.getImplementedInterfaces()); } } intfNamesToAllInterfaces = Maps.put(intfNamesToAllInterfaces, intfName, toReturn); return toReturn; }