예제 #1
0
  @Override
  public List<Source> descendants() {
    List<Source> descendants = new ArrayList<>();

    for (int i = 0; i < sources.size(); i++) {
      DynamicNode dynamicNode = sources.get(i);
      for (DynamicNode.RenderedNode rendered :
          dynamicNode.render(Collections.emptyMap(), potentials)) {
        descendants.add(new RenderedSource(rendered.variablesUsed(), sources, potentials, i));
      }
    }

    return descendants;
  }
예제 #2
0
    @Override
    public List<Source> descendants() {
      List<Source> descendants = new ArrayList<>();

      for (int i = index; i < sources.size(); i++) {
        DynamicNode dynamicNode = sources.get(i);

        if (dynamicNode.variables().containsAll(variables.keySet())) {
          List<DynamicNode.RenderedNode> rendered = dynamicNode.render(variables, potentials);

          for (DynamicNode.RenderedNode source : rendered) {
            Map<String, String> descendantVars = new HashMap<>(variables);
            descendantVars.putAll(source.variablesUsed());
            descendants.add(new RenderedSource(descendantVars, sources, potentials, i));
          }
        }
      }

      return descendants;
    }
예제 #3
0
 @Override
 public String path() {
   return rendered.path();
 }