Package gg.jte.compiler.kotlin
Class KotlinCodeGenerator
java.lang.Object
gg.jte.compiler.kotlin.KotlinCodeGenerator
- All Implemented Interfaces:
CodeGenerator,TemplateParserVisitor
-
Nested Class Summary
Nested classes/interfaces inherited from interface gg.jte.compiler.CodeGenerator
CodeGenerator.TemplateExpressionPart -
Constructor Summary
ConstructorsConstructorDescriptionKotlinCodeGenerator(TemplateCompiler compiler, gg.jte.TemplateConfig config, ConcurrentHashMap<String, List<ParamInfo>> paramOrder, gg.jte.runtime.ClassInfo classInfo, LinkedHashSet<ClassDefinition> classDefinitions, LinkedHashSet<TemplateDependency> templateDependencies) -
Method Summary
Modifier and TypeMethodDescriptionList<byte[]>getCode()intvoidonCodePart(int depth, String codePart) voidonCodeStatement(int depth, String codePart) voidvoidonConditionElse(int depth) voidonConditionElse(int depth, String condition) voidonConditionEnd(int depth) voidonConditionStart(int depth, String condition) voidvoidvoidonForLoopEnd(int depth) voidonForLoopStart(int depth, String codePart) voidonHtmlAttributeOutput(int depth, TemplateParser.HtmlTag currentHtmlTag, TemplateParser.HtmlAttribute htmlAttribute) voidonHtmlTagAttributeCodePart(int depth, String codePart, String tagName, String attributeName) voidonHtmlTagBodyCodePart(int depth, String codePart, String tagName) voidvoidonInterceptHtmlTagClosed(int depth, TemplateParser.HtmlTag htmlTag) voidonInterceptHtmlTagOpened(int depth, TemplateParser.HtmlTag htmlTag) voidvoidvoidvoidonTemplateCall(int depth, String name, List<String> params) voidonTextPart(int depth, String textPart) voidonUnsafeCodePart(int depth, String codePart) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gg.jte.compiler.TemplateParserVisitor
onRawEnd, onRawStart
-
Constructor Details
-
KotlinCodeGenerator
public KotlinCodeGenerator(TemplateCompiler compiler, gg.jte.TemplateConfig config, ConcurrentHashMap<String, List<ParamInfo>> paramOrder, gg.jte.runtime.ClassInfo classInfo, LinkedHashSet<ClassDefinition> classDefinitions, LinkedHashSet<TemplateDependency> templateDependencies)
-
-
Method Details
-
onImport
- Specified by:
onImportin interfaceTemplateParserVisitor
-
onParam
- Specified by:
onParamin interfaceTemplateParserVisitor
-
onParamsComplete
public void onParamsComplete()- Specified by:
onParamsCompletein interfaceTemplateParserVisitor
-
onLineFinished
public void onLineFinished()- Specified by:
onLineFinishedin interfaceTemplateParserVisitor
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceTemplateParserVisitor
-
onError
- Specified by:
onErrorin interfaceTemplateParserVisitor
-
onError
- Specified by:
onErrorin interfaceTemplateParserVisitor
-
onTextPart
- Specified by:
onTextPartin interfaceTemplateParserVisitor
-
onCodePart
- Specified by:
onCodePartin interfaceTemplateParserVisitor
-
onHtmlTagBodyCodePart
- Specified by:
onHtmlTagBodyCodePartin interfaceTemplateParserVisitor
-
onHtmlTagAttributeCodePart
public void onHtmlTagAttributeCodePart(int depth, String codePart, String tagName, String attributeName) - Specified by:
onHtmlTagAttributeCodePartin interfaceTemplateParserVisitor
-
onUnsafeCodePart
- Specified by:
onUnsafeCodePartin interfaceTemplateParserVisitor
-
onCodeStatement
- Specified by:
onCodeStatementin interfaceTemplateParserVisitor
-
onConditionStart
- Specified by:
onConditionStartin interfaceTemplateParserVisitor
-
onConditionElse
- Specified by:
onConditionElsein interfaceTemplateParserVisitor
-
onConditionElse
public void onConditionElse(int depth) - Specified by:
onConditionElsein interfaceTemplateParserVisitor
-
onConditionEnd
public void onConditionEnd(int depth) - Specified by:
onConditionEndin interfaceTemplateParserVisitor
-
onForLoopStart
- Specified by:
onForLoopStartin interfaceTemplateParserVisitor
-
onForLoopEnd
public void onForLoopEnd(int depth) - Specified by:
onForLoopEndin interfaceTemplateParserVisitor
-
onTemplateCall
- Specified by:
onTemplateCallin interfaceTemplateParserVisitor
-
onInterceptHtmlTagOpened
- Specified by:
onInterceptHtmlTagOpenedin interfaceTemplateParserVisitor
-
onInterceptHtmlTagClosed
- Specified by:
onInterceptHtmlTagClosedin interfaceTemplateParserVisitor
-
onHtmlAttributeOutput
public void onHtmlAttributeOutput(int depth, TemplateParser.HtmlTag currentHtmlTag, TemplateParser.HtmlAttribute htmlAttribute) - Specified by:
onHtmlAttributeOutputin interfaceTemplateParserVisitor
-
getCurrentTemplateLine
public int getCurrentTemplateLine()- Specified by:
getCurrentTemplateLinein interfaceCodeGenerator
-
getCode
- Specified by:
getCodein interfaceCodeGenerator
-
getBinaryTextParts
- Specified by:
getBinaryTextPartsin interfaceCodeGenerator
-