org.stjs.generator.javascript
Interface JavaScriptBuilder<T>

All Known Implementing Classes:
RhinoJavaScriptBuilder, SouceJavaScriptBuilder

public interface JavaScriptBuilder<T>

.

Author:
acraciun

Method Summary
 T addStatement(T blockOrStatement, T statement)
           
 T addStatementBeginning(T blockOrStatement, T statement)
           
 T array(Iterable<T> values)
           
 T asExpressionList(Iterable<T> nodes)
           
 T assignment(AssignOperator operator, T left, T right)
           
 T binary(BinaryOperator operator, Iterable<T> operands)
           
 T block(Iterable<T> statements)
           
 T breakStatement(T label)
           
 T caseStatement(T expression, Iterable<T> statements)
           
 T catchClause(T varName, T body)
           
 T character(String c)
           
 T code(String code)
           
 T comment(T node, String comment)
           
 T conditionalExpression(T test, T trueExpr, T falseExpr)
           
 T continueStatement(T label)
           
 T doLoop(T condition, T body)
           
 T elementGet(T target, T index)
           
 T emptyExpression()
           
 T emptyStatement()
           
 T expressionStatement(T expr)
           
 T forInLoop(T iterator, T iterated, T body)
           
 T forLoop(T init, T condition, T update, T body)
           
 T function(String name, Iterable<T> params, T body)
           
 T functionCall(T target, Iterable<T> arguments)
           
 T ifStatement(T condition, T thenPart, T elsePart)
           
 T keyword(Keyword token)
           
 T label(CharSequence name)
           
 T labeledStatement(T label, T statement)
           
 T name(CharSequence name)
           
 T newExpression(T target, Iterable<T> arguments)
           
 T number(Number n)
           
 T object(Iterable<NameValue<T>> props)
           
 T paren(T expr)
           
 T position(T node, int javaLineNumber, int javaColumnNumber)
           
 T property(T target, CharSequence name)
           
 T returnStatement(T returnValue)
           
 T root(Iterable<T> children)
           
 T statements(Iterable<T> stmts)
           
 T string(String value)
           
 T switchStatement(T expr, Iterable<T> cases)
           
 T throwStatement(T expr)
           
 String toString(T node)
           
 T tryStatement(T tryBlock, Iterable<T> catchClauses, T finallyBlock)
           
 T unary(UnaryOperator operator, T operand)
           
 T variableDeclaration(boolean statement, CharSequence name, T init)
           
 T variableDeclaration(boolean statement, Iterable<NameValue<T>> vars)
           
 T whileLoop(T condition, T body)
           
 com.google.debugging.sourcemap.SourceMapGenerator writeJavaScript(T javascriptRoot, File inputFile, boolean generateSourceMap, Writer writer)
           
 

Method Detail

array

T array(@Nonnull
        Iterable<T> values)

asExpressionList

T asExpressionList(@Nonnull
                   Iterable<T> nodes)

assignment

T assignment(@Nonnull
             AssignOperator operator,
             @Nonnull
             T left,
             @Nonnull
             T right)

binary

T binary(@Nonnull
         BinaryOperator operator,
         @Nonnull
         Iterable<T> operands)

block

T block(@Nonnull
        Iterable<T> statements)

breakStatement

T breakStatement(@Nullable
                 T label)

caseStatement

T caseStatement(@Nullable
                T expression,
                @Nonnull
                Iterable<T> statements)

catchClause

T catchClause(@Nonnull
              T varName,
              @Nonnull
              T body)

continueStatement

T continueStatement(@Nullable
                    T label)

elementGet

T elementGet(@Nonnull
             T target,
             @Nonnull
             T index)

expressionStatement

T expressionStatement(@Nonnull
                      T expr)

function

T function(@Nullable
           String name,
           @Nonnull
           Iterable<T> params,
           @Nullable
           T body)

functionCall

T functionCall(@Nonnull
               T target,
               @Nonnull
               Iterable<T> arguments)

keyword

T keyword(@Nonnull
          Keyword token)

name

T name(@Nonnull
       CharSequence name)

label

T label(@Nonnull
        CharSequence name)

newExpression

T newExpression(@Nonnull
                T target,
                @Nonnull
                Iterable<T> arguments)

object

T object(@Nonnull
         Iterable<NameValue<T>> props)

paren

T paren(@Nonnull
        T expr)

position

T position(@Nonnull
           T node,
           int javaLineNumber,
           int javaColumnNumber)

property

T property(@Nullable
           T target,
           @Nonnull
           CharSequence name)

string

T string(@Nonnull
         String value)

unary

T unary(@Nonnull
        UnaryOperator operator,
        @Nonnull
        T operand)

variableDeclaration

T variableDeclaration(boolean statement,
                      @Nonnull
                      Iterable<NameValue<T>> vars)

variableDeclaration

T variableDeclaration(boolean statement,
                      @Nonnull
                      CharSequence name,
                      @Nullable
                      T init)

doLoop

T doLoop(@Nonnull
         T condition,
         @Nonnull
         T body)

emptyStatement

T emptyStatement()

emptyExpression

T emptyExpression()

forInLoop

T forInLoop(@Nullable
            T iterator,
            @Nullable
            T iterated,
            @Nullable
            T body)

forLoop

T forLoop(@Nullable
          T init,
          @Nullable
          T condition,
          @Nullable
          T update,
          @Nullable
          T body)

ifStatement

T ifStatement(@Nonnull
              T condition,
              @Nonnull
              T thenPart,
              @Nullable
              T elsePart)

addStatement

T addStatement(@Nullable
               T blockOrStatement,
               @Nullable
               T statement)

addStatementBeginning

T addStatementBeginning(@Nullable
                        T blockOrStatement,
                        @Nullable
                        T statement)

labeledStatement

T labeledStatement(@Nonnull
                   T label,
                   @Nonnull
                   T statement)

returnStatement

T returnStatement(@Nullable
                  T returnValue)

switchStatement

T switchStatement(@Nonnull
                  T expr,
                  @Nonnull
                  Iterable<T> cases)

tryStatement

T tryStatement(@Nonnull
               T tryBlock,
               @Nonnull
               Iterable<T> catchClauses,
               @Nullable
               T finallyBlock)

whileLoop

T whileLoop(@Nonnull
            T condition,
            @Nullable
            T body)

root

T root(@Nonnull
       Iterable<T> children)

code

T code(@Nonnull
       String code)

toString

String toString(@Nullable
                T node)

conditionalExpression

T conditionalExpression(@Nonnull
                        T test,
                        @Nonnull
                        T trueExpr,
                        @Nonnull
                        T falseExpr)

character

T character(@Nonnull
            String c)

number

T number(@Nonnull
         Number n)

statements

T statements(@Nonnull
             Iterable<T> stmts)

writeJavaScript

com.google.debugging.sourcemap.SourceMapGenerator writeJavaScript(T javascriptRoot,
                                                                  File inputFile,
                                                                  boolean generateSourceMap,
                                                                  Writer writer)

comment

T comment(@Nullable
          T node,
          @Nullable
          String comment)

throwStatement

T throwStatement(@Nonnull
                 T expr)


Copyright © 2014. All Rights Reserved.