Returns an immutable mapping containing the global variables of this module. The bindings are returned in a deterministic order (for a given sequence of initial values and updates).
()
| 208 | * and updates). |
| 209 | */ |
| 210 | public ImmutableMap<String, Object> getGlobals() { |
| 211 | int n = globalIndex.size(); |
| 212 | ImmutableMap.Builder<String, Object> m = ImmutableMap.builderWithExpectedSize(n); |
| 213 | for (Map.Entry<String, Integer> e : globalIndex.entrySet()) { |
| 214 | Object v = getGlobalByIndex(e.getValue()); |
| 215 | if (v != null) { |
| 216 | m.put(e.getKey(), v); |
| 217 | } |
| 218 | } |
| 219 | return m.buildOrThrow(); |
| 220 | } |
| 221 | |
| 222 | /** Implements the resolver's module interface. */ |
| 223 | @Override |