Exemplo n.º 1
0
 /**
  * @return The path to this configuration from the top-level config, including the top-level
  *     config. '/'-separated.
  */
 public String getPath() {
   java.util.ArrayList<MutableConfig> configPath = new java.util.ArrayList<>();
   MutableConfig config = this;
   while (config != null) {
     configPath.add(config);
     config = config.getParent();
   }
   StringBuilder ret = new StringBuilder();
   for (int i = configPath.size() - 1; i >= 0; i--) {
     ret.append(configPath.get(i).getName());
     if (i > 0) ret.append('/');
   }
   return ret.toString();
 }