Ejemplo n.º 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);
 }
Ejemplo n.º 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]);
 }