コード例 #1
0
 @Override
 public int canHandle(Resource resource) {
   if (resource.getName().endsWith(getExt())) {
     return getPriority();
   }
   return TemplateLoader.NO_PRIORITY;
 }
コード例 #2
0
 @Override
 public Template loadTemplate(Resource resource) throws IOException {
   String name = resource.getName();
   String outputName = name.substring(0, name.length() - getExt().length());
   return loadTemplate(outputName, resource);
 }