org.stjs.generator.writer.templates
Class AssertTemplate<JS>

java.lang.Object
  extended by org.stjs.generator.writer.templates.AssertTemplate<JS>
All Implemented Interfaces:
VisitorContributor<com.sun.source.tree.MethodInvocationTree,JS,GenerationContext<JS>,WriterVisitor<JS>>, WriterContributor<com.sun.source.tree.MethodInvocationTree,JS>

public class AssertTemplate<JS>
extends Object
implements WriterContributor<com.sun.source.tree.MethodInvocationTree,JS>

This template generate a code that allows you to add into the javascript file the original java code and its position in the source file. It's no longer very useful since the javaScript stacktrace can be translated back to Java stacktrace. assertMethod(params) -> assertMethod("sourceFile:line", "assertMethod(params)", params);

Author:
acraciun

Constructor Summary
AssertTemplate()
           
 
Method Summary
 JS visit(WriterVisitor<JS> visitor, com.sun.source.tree.MethodInvocationTree tree, GenerationContext<JS> context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertTemplate

public AssertTemplate()
Method Detail

visit

public JS visit(WriterVisitor<JS> visitor,
                com.sun.source.tree.MethodInvocationTree tree,
                GenerationContext<JS> context)
Specified by:
visit in interface VisitorContributor<com.sun.source.tree.MethodInvocationTree,JS,GenerationContext<JS>,WriterVisitor<JS>>


Copyright © 2014. All Rights Reserved.