List<String> toRescue = new ArrayList<String>();
Collections.addAll(toRescue, fields);
Collections.addAll(toRescue, methods);
for (String name : toRescue) {
JsniRef ref = JsniRef.parse("@" + classType.getName() + "::" + name);
final String[] errors = {null};
HasEnclosingType node = JsniRefLookup.findJsniRefTarget(ref, program,
new JsniRefLookup.ErrorReporter() {
public void reportError(String error) {
errors[0] = error;