Package juzu.impl.plugin.template.metadata

Examples of juzu.impl.plugin.template.metadata.TemplateDescriptor


      //
      Path.Absolute resolved = descriptor.getPackage().resolve(path);

      //
      TemplateDescriptor desc;
      try {
        Class<?> clazz = context.getClassLoader().loadClass(resolved.getName().toString());
        Field f = clazz.getField("DESCRIPTOR");
        desc = (TemplateDescriptor)f.get(null);
      }
      catch (Exception e) {
        throw new UnsupportedOperationException("Handle me gracefully", e);
      }

      //
      stub = desc.getStub();

      //
      TemplateStub phantom = stubs.putIfAbsent(path, stub);
      if (phantom != null) {
        stub = phantom;
View Full Code Here


    MockApplication<?> app = application("plugin.template.tag.decorate").init();

    // Manufacture a template
    // to be removed later when we improve this
    // but for now it will be enough
    TemplateDescriptor desc = app.getLifeCycle().resolveBean(TemplateService.class).getDescriptor().getTemplate("/plugin/template/tag/decorate/templates/index.gtmpl");
    assertNotNull(desc);
    TemplateModel<?> foo = new TemplateModel<ASTNode.Template>(
      new ASTNode.Template(),
      (Path.Absolute)Path.parse("/" + desc.getType().getName().replace('.', '/') + "/foo.gtmpl"),
      System.currentTimeMillis(),
      0);

    //
    HashMap<Path.Absolute, TemplateModel<?>> templates = new HashMap<Path.Absolute, TemplateModel<?>>();
View Full Code Here

TOP

Related Classes of juzu.impl.plugin.template.metadata.TemplateDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.