/** Helper for implementing NameSource */ protected void getAllNamesAux(List<String> list) { list.addAll(variables.keySet()); list.addAll(methods.keySet()); if (parent != null) parent.getAllNamesAux(list); }
/** * Implements NameSource * * @return all variable and method names in this and all parent namespaces */ public String[] getAllNames() { List<String> list = new ArrayList<String>(); getAllNamesAux(list); return list.toArray(new String[0]); }