factory.compile(new StringReader(mustacheTemplateModel.getModel().source), mustacheTemplateModel.getPath().getSimpleName());
factory.compile(new StringReader(mustacheTemplateModel.getModel().source), mustacheTemplateModel.getPath().getSimpleName());
public FileObject createResource(JavaFileManager.Location location, Path.Absolute path, Element... originatingElements) throws IOException { return createResource(location, path.getDirs(), path.getSimpleName(), originatingElements); }
public FileObject getResource(JavaFileManager.Location location, Path.Absolute path) throws IOException { return getResource(location, path.getDirs(), path.getSimpleName()); }
public FileObject getResource(JavaFileManager.Location location, Path.Absolute path) throws IOException { return getResource(location, path.getDirs(), path.getSimpleName()); }
@Test public void testResolveUp() throws Exception { Name name = Name.parse("foo.bar"); Path.Absolute file = name.resolve("../juu/daa.txt"); assertEquals("foo.juu", file.getDirs().toString()); assertEquals("daa.txt", file.getSimpleName()); assertEquals("txt", file.getExt()); assertEquals("daa", file.getRawName()); assertEquals("foo.juu.daa", file.getName().toString()); }
@Test public void testResolveDotInRawName() throws Exception { Name name = Name.parse("foo"); Path path = Path.parse("a.b.c"); Path.Absolute file = name.resolve(path); assertEquals("foo", file.getDirs().toString()); assertEquals("a.b.c", file.getSimpleName()); assertEquals("b.c", file.ext); assertEquals("a", file.getRawName()); assertEquals("foo.a", file.getName().toString()); }
public FileObject createResource(JavaFileManager.Location location, Path.Absolute path, Element... originatingElements) throws IOException { return createResource(location, path.getDirs(), path.getSimpleName(), originatingElements); }
@Test public void testResolveDotInRawName() throws Exception { Name name = Name.parse("foo"); Path path = Path.parse("a.b.c"); Path.Absolute file = name.resolve(path); assertEquals("foo", file.getDirs().toString()); assertEquals("a.b.c", file.getSimpleName()); assertEquals("b.c", file.ext); assertEquals("a", file.getRawName()); assertEquals("foo.a", file.getName().toString()); }
@Test public void testResolveUp() throws Exception { Name name = Name.parse("foo.bar"); Path.Absolute file = name.resolve("../juu/daa.txt"); assertEquals("foo.juu", file.getDirs().toString()); assertEquals("daa.txt", file.getSimpleName()); assertEquals("txt", file.getExt()); assertEquals("daa", file.getRawName()); assertEquals("foo.juu.daa", file.getName().toString()); }