Codota Logo
juzu.impl.template.spi.juzu.dialect.gtmpl
Code IndexAdd Codota to your IDE (free)

How to use juzu.impl.template.spi.juzu.dialect.gtmpl

Best Java code snippets using juzu.impl.template.spi.juzu.dialect.gtmpl (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: juzu/juzu

public final void println(Object o) throws IOException {
 print(o);
 println();
}
origin: org.juzu/juzu-core

public String resolveMessage(MessageKey key) {
 return key.toString();
}
origin: org.juzu/juzu-core

private String toString(Object o) {
 Object f = format(o);
 if (f == null) {
  return "null";
 }
 else if (f instanceof String) {
  return (String)f;
 }
 else {
  return o.toString();
 }
}
origin: juzu/juzu

 @Override
 public final void emit(EmitContext context, TemplateModel<ASTNode.Template> templateModel) throws TemplateException, IOException {
  GroovyTemplateEmitter emitter = new GroovyTemplateEmitter(templateModel.getPath().getName());
  EmitPhase tcc = new EmitPhase(context);
  tcc.emit(emitter, templateModel.getModel());
  Path.Absolute path = templateModel.getPath();
  path = path.as(path.getRawName() + "_", "groovy");
  context.createResource(path, emitter.toString());
 }
}
origin: org.juzu/juzu-core

@Override
public void doRender(TemplateRenderContext renderContext) throws TemplateExecutionException, IOException {
 Binding binding = new BindingImpl(renderContext);
 //
 Script script = InvokerHelper.createScript(scriptClass, binding);
 //
 try {
  script.run();
 }
 catch (Exception e) {
  if (e instanceof IOException) {
   throw (IOException)e;
  }
  else {
   throw buildRuntimeException(e);
  }
 }
 catch (Throwable e) {
  if (e instanceof Error) {
   throw ((Error)e);
  }
  throw buildRuntimeException(e);
 }
}
origin: juzu/juzu

public void appendExpression(String expr) {
 out.append(expr);
 locationTable.put(lineNumber, new Foo(pos, expr));
}
origin: org.juzu/juzu-core

public BindingImpl(TemplateRenderContext renderContext) {
 super(renderContext.getAttributes());
 //
 this.printer = new GroovyPrinter(renderContext);
 this.renderContext = renderContext;
}
origin: org.juzu/juzu-core

public GroovyTemplateStub build(String templateId) {
 final String script = toString();
 return new GroovyTemplateStub(Thread.currentThread().getContextClassLoader(), templateId) {
  @Override
  public String getScript(ClassLoader loader, String fqn) {
   return script;
  }
 };
}
origin: org.juzu/juzu-core

@Test
public void testSiblingClosures() throws IOException, TemplateException {
 GroovyTemplateStub template = template("#{title value=a/}#{title value=b/}");
 template.getClassName();
}
origin: org.juzu/juzu-core

 @Override
 public final void emit(EmitContext context, TemplateModel<ASTNode.Template> templateModel) throws TemplateException, IOException {
  GroovyTemplateEmitter emitter = new GroovyTemplateEmitter(templateModel.getPath().getName());
  EmitPhase tcc = new EmitPhase(context);
  tcc.emit(emitter, templateModel.getModel());
  Path.Absolute path = templateModel.getPath();
  path = path.as(path.getRawName() + "_", "groovy");
  context.createResource(path, emitter.toString());
 }
}
origin: org.juzu/juzu-core

public final void println(Object o) throws IOException {
 print(o);
 println();
}
origin: juzu/juzu

@Override
public void doRender(TemplateRenderContext renderContext) throws TemplateExecutionException, IOException {
 Binding binding = new BindingImpl(renderContext);
 //
 Script script = InvokerHelper.createScript(scriptClass, binding);
 //
 try {
  script.run();
 }
 catch (Exception e) {
  if (e instanceof IOException) {
   throw (IOException)e;
  }
  else {
   throw buildRuntimeException(e);
  }
 }
 catch (Throwable e) {
  if (e instanceof Error) {
   throw ((Error)e);
  }
  throw buildRuntimeException(e);
 }
}
origin: org.juzu/juzu-core

public void appendScriptlet(String scriptlet) {
 out.append(scriptlet);
 locationTable.put(lineNumber, new Foo(pos, scriptlet));
}
origin: juzu/juzu

public String resolveMessage(MessageKey key) {
 return key.toString();
}
origin: juzu/juzu

private String toString(Object o) {
 Object f = format(o);
 if (f == null) {
  return "null";
 }
 else if (f instanceof String) {
  return (String)f;
 }
 else {
  return o.toString();
 }
}
origin: juzu/juzu

public BindingImpl(TemplateRenderContext renderContext) {
 super(renderContext.getAttributes());
 //
 this.printer = new GroovyPrinter(renderContext);
 this.renderContext = renderContext;
}
origin: juzu/juzu

public GroovyTemplateStub build(String templateId) {
 final String script = toString();
 return new GroovyTemplateStub(Thread.currentThread().getContextClassLoader(), templateId) {
  @Override
  public String getScript(ClassLoader loader, String fqn) {
   return script;
  }
 };
}
origin: juzu/juzu

@Test
public void testSiblingClosures() throws IOException, TemplateException {
 GroovyTemplateStub template = template("#{title value=a/}#{title value=b/}");
 template.getClassName();
}
origin: org.juzu/juzu-core

public void appendExpression(String expr) {
 out.append(expr);
 locationTable.put(lineNumber, new Foo(pos, expr));
}
origin: juzu/juzu

public void appendScriptlet(String scriptlet) {
 out.append(scriptlet);
 locationTable.put(lineNumber, new Foo(pos, scriptlet));
}
juzu.impl.template.spi.juzu.dialect.gtmpl

Most used classes

  • GroovyTemplateEmitter
  • GroovyTemplateStub
  • BindingImpl
  • Foo
  • GroovyPrinter
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now