if (backingMap.get() != null) {
return;
}
Map<String, Variable> vars = new HashMap<>();
for (Map.Entry<String, JavaScriptVariable> entry : jsVariables.entrySet()) {
JavaScriptVariable jsVar = entry.getValue();
String name;
if (className.endsWith("[]")) {
if (entry.getKey().equals("data")) {
name = entry.getKey();
} else {
continue;
}
} else if (isNumeric(entry.getKey())) {
name = entry.getKey();
} else {
name = debugger.mapField(className, entry.getKey());
if (name == null) {
continue;
}
}
Value value = new Value(debugger, jsVar.getValue());
vars.put(entry.getKey(), new Variable(name, value));
}
backingMap.compareAndSet(null, vars);
}