public class JsCodeGenerator extends CodeGeneratorBase
JsWriter.| Modifier and Type | Field and Description |
|---|---|
static List<String> |
ANNOTATIONS_FOR_COMPILER_ONLY |
static List<String> |
ANNOTATIONS_TO_TRIGGER_AT_RUNTIME |
static String |
DEFAULT_ANNOTATION_PARAMETER_NAME |
static String |
INIT_STATICS |
static Set<String> |
PRIMITIVES |
out| Constructor and Description |
|---|
JsCodeGenerator(JsWriter out,
CompilationUnitResolver compilationUnitModelResolver) |
visitAll, visitBinaryOpExpr, visitCommaSeparatedList, visitConditionalExpr, visitIfNotNull, visitIfNotNull, visitIsExpr, visitLiteralExpr, visitPostfixOpExpr, visitPredefinedTypeDeclaration, visitPrefixOpExpr, writeModifiers, writeOptSymbol, writeOptSymbol, writeSymbolReplacementpublic static final List<String> ANNOTATIONS_TO_TRIGGER_AT_RUNTIME
public static final String DEFAULT_ANNOTATION_PARAMETER_NAME
public static final String INIT_STATICS
public JsCodeGenerator(JsWriter out, CompilationUnitResolver compilationUnitModelResolver)
public void visitDotExpr(DotExpr dotExpr) throws IOException
visitDotExpr in interface AstVisitorvisitDotExpr in class CodeGeneratorBaseIOExceptionpublic void visitTypeRelation(TypeRelation typeRelation) throws IOException
IOExceptionpublic void visitAnnotationParameter(AnnotationParameter annotationParameter) throws IOException
IOExceptionpublic void visitExtends(Extends anExtends) throws IOException
IOExceptionpublic void visitInitializer(Initializer initializer) throws IOException
IOExceptionpublic void visitObjectField(ObjectField objectField) throws IOException
IOExceptionpublic void visitForInitializer(ForInitializer forInitializer) throws IOException
IOExceptionpublic void visitCompilationUnit(CompilationUnit compilationUnit) throws IOException
IOExceptionpublic void visitIde(Ide ide) throws IOException
IOExceptionpublic void visitQualifiedIde(QualifiedIde qualifiedIde) throws IOException
IOExceptionpublic void visitIdeWithTypeParam(IdeWithTypeParam ideWithTypeParam) throws IOException
IOExceptionpublic void visitNamespacedIde(NamespacedIde namespacedIde) throws IOException
IOExceptionpublic void visitImplements(Implements anImplements) throws IOException
IOExceptionpublic void visitType(Type type) throws IOException
IOExceptionpublic void visitObjectLiteral(ObjectLiteral objectLiteral) throws IOException
IOExceptionpublic void visitIdeExpression(IdeExpr ideExpr) throws IOException
IOExceptionpublic <T extends Expr> void visitParenthesizedExpr(ParenthesizedExpr<T> parenthesizedExpr) throws IOException
IOExceptionpublic void visitArrayLiteral(ArrayLiteral arrayLiteral) throws IOException
IOExceptionpublic void visitAssignmentOpExpr(AssignmentOpExpr assignmentOpExpr) throws IOException
IOExceptionpublic void visitInfixOpExpr(InfixOpExpr infixOpExpr) throws IOException
IOExceptionpublic void visitAsExpr(AsExpr asExpr) throws IOException
IOExceptionpublic void visitArrayIndexExpr(ArrayIndexExpr arrayIndexExpr) throws IOException
IOExceptionpublic void visitParameters(Parameters parameters) throws IOException
visitParameters in interface AstVisitorvisitParameters in class CodeGeneratorBaseIOExceptionpublic void visitFunctionExpr(FunctionExpr functionExpr) throws IOException
IOExceptionpublic void generateFunTailCode(FunctionExpr functionExpr) throws IOException
IOExceptionpublic CodeGenerator getParameterInitializerCodeGenerator(Parameters params)
public void generateRestParamCode(Parameter param, int paramIndex) throws IOException
IOExceptionpublic void generateBodyInitializerCode(Parameter param) throws IOException
IOExceptionpublic void generateSignatureJsCode(FunctionExpr functionExpr) throws IOException
IOExceptionpublic void visitVectorLiteral(VectorLiteral vectorLiteral) throws IOException
IOExceptionpublic void visitApplyExpr(ApplyExpr applyExpr) throws IOException
IOExceptionpublic void visitNewExpr(NewExpr newExpr) throws IOException
IOExceptionpublic void visitClassBody(ClassBody classBody) throws IOException
IOExceptionpublic void visitBlockStatement(BlockStatement blockStatement) throws IOException
IOExceptionpublic void visitDefaultStatement(DefaultStatement defaultStatement) throws IOException
IOExceptionpublic void visitLabeledStatement(LabeledStatement labeledStatement) throws IOException
IOExceptionpublic void visitIfStatement(IfStatement ifStatement) throws IOException
IOExceptionpublic void visitCaseStatement(CaseStatement caseStatement) throws IOException
IOExceptionpublic void visitTryStatement(TryStatement tryStatement) throws IOException
IOExceptionpublic void visitCatch(Catch aCatch) throws IOException
IOExceptionpublic void visitForInStatement(ForInStatement forInStatement) throws IOException
IOExceptionpublic void visitWhileStatement(WhileStatement whileStatement) throws IOException
IOExceptionpublic void visitForStatement(ForStatement forStatement) throws IOException
IOExceptionpublic void visitDoStatement(DoStatement doStatement) throws IOException
IOExceptionpublic void visitSwitchStatement(SwitchStatement switchStatement) throws IOException
IOExceptionpublic void visitSemicolonTerminatedStatement(SemicolonTerminatedStatement semicolonTerminatedStatement) throws IOException
IOExceptionpublic void visitContinueStatement(ContinueStatement continueStatement) throws IOException
IOExceptionpublic void visitBreakStatement(BreakStatement breakStatement) throws IOException
IOExceptionpublic void visitThrowStatement(ThrowStatement throwStatement) throws IOException
IOExceptionpublic void visitReturnStatement(ReturnStatement returnStatement) throws IOException
IOExceptionpublic void visitEmptyStatement(EmptyStatement emptyStatement) throws IOException
IOExceptionpublic void visitEmptyDeclaration(EmptyDeclaration emptyDeclaration) throws IOException
IOExceptionpublic void visitParameter(Parameter parameter) throws IOException
IOExceptionpublic void visitVariableDeclaration(VariableDeclaration variableDeclaration) throws IOException
IOExceptionprotected void generateVarStartCode(VariableDeclaration variableDeclaration) throws IOException
IOExceptionprotected void generateFieldInitializerCode(VariableDeclaration variableDeclaration) throws IOException
IOExceptionprotected void generateFieldEndCode(VariableDeclaration variableDeclaration) throws IOException
IOExceptionpublic void visitFunctionDeclaration(FunctionDeclaration functionDeclaration) throws IOException
IOExceptionpublic void visitClassDeclaration(ClassDeclaration classDeclaration) throws IOException
IOExceptionpublic void generateInitCode(VariableDeclaration field, boolean endWithSemicolon) throws IOException
IOExceptionpublic void visitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration) throws IOException
IOExceptionpublic void visitPackageDeclaration(PackageDeclaration packageDeclaration) throws IOException
IOExceptionpublic void visitSuperConstructorCallStatement(SuperConstructorCallStatement superConstructorCallStatement) throws IOException
IOExceptionpublic void visitAnnotation(Annotation annotation) throws IOException
IOExceptionpublic void visitUseNamespaceDirective(UseNamespaceDirective useNamespaceDirective) throws IOException
IOExceptionpublic void visitImportDirective(ImportDirective importDirective) throws IOException
IOExceptionCopyright © 2002–2020 CoreMedia AG. All rights reserved.