class CompositeTemplateLoader implements TemplateLoader {

  @Override
  public TemplateSource sourceAt(final String location) throws IOException {
    for (TemplateLoader delegate : delegates) {
      try {
        return delegate.sourceAt(location);
      } catch (IOException ex) {
        // try next loader in the chain.
        logger.trace("Unable to resolve: {}, trying next loader in the chain.", location);
      }
    }
    throw new FileNotFoundException(location);
  }

  public  CompositeTemplateLoader(final TemplateLoader... loaders);

}