Esempio n. 1
0
  @Override
  public Resource read(ManifestResourceElement element, FileScope fileScope) {
    String name = element.getAttribute("name");
    Assert.ifEmpty(name, "url must contain name");

    String pattern = element.getAttributeOrValue("pattern");
    Assert.ifEmpty(pattern, "url " + name + " must contain pattern");

    return new URLPatternResource(name, pattern);
  }
Esempio n. 2
0
 @Override
 public boolean accept(ManifestResourceElement element) {
   return element.getType().equals("url");
 }