Beispiel #1
0
 /** Helper for implementing NameSource */
 protected void getAllNamesAux(List<String> list) {
   list.addAll(variables.keySet());
   list.addAll(methods.keySet());
   if (parent != null) parent.getAllNamesAux(list);
 }
Beispiel #2
0
 /**
  * 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]);
 }