@Test public void testCustomVirtualPathSeparator() throws IOException { TemplateLocator locator = FileSystemTemplateLocator.builder() .setPriority(1).setRootPath("src/test/resources/locator/file") .setSuffix("foo").build(); MustacheEngineBuilder.newBuilder().addTemplateLocator(locator) .setProperty(PathTemplateLocator.VIRTUAL_PATH_SEPARATOR_KEY, "*") .build(); Set<String> names = locator.getAllIdentifiers(); assertEquals(5, names.size()); assertTrue(names.contains("index")); assertTrue(names.contains("home")); assertTrue(names.contains("foo")); assertTrue(names.contains("sub*bar")); assertTrue(names.contains("sub*subsub*qux")); assertEquals("{{foo}}", read(locator.locate("index"))); assertEquals("bar", read(locator.locate("home"))); assertEquals("{{foo}}", read(locator.locate("sub*bar"))); assertEquals("{{bar}}", read(locator.locate("sub*subsub*qux"))); }
public static Builder builder() { return new Builder(); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); @Override Reader locateRealPath(String realPath); static Builder builder(); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); @Override Reader locateRealPath(String realPath); static Builder builder();  }