From f235da6e92d63ac462c9f2b5aca1923d520a165c Mon Sep 17 00:00:00 2001 From: Alexander Ioffe Date: Thu, 14 Mar 2024 13:14:18 -0400 Subject: [PATCH] Need to add the ConstructorComponent annotation --- .../src/main/kotlin/io/decomat/Annotations.kt | 4 +++ .../main/kotlin/io/decomat/OutputDirective.kt | 27 ------------------- 2 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 decomat-ksp/src/main/kotlin/io/decomat/OutputDirective.kt diff --git a/decomat-core/src/main/kotlin/io/decomat/Annotations.kt b/decomat-core/src/main/kotlin/io/decomat/Annotations.kt index 32303f3..16b5ac5 100644 --- a/decomat-core/src/main/kotlin/io/decomat/Annotations.kt +++ b/decomat-core/src/main/kotlin/io/decomat/Annotations.kt @@ -11,3 +11,7 @@ annotation class Component @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.VALUE_PARAMETER) annotation class MiddleComponent + +@Retention(AnnotationRetention.SOURCE) +@Target(AnnotationTarget.VALUE_PARAMETER) +annotation class ConstructorComponent diff --git a/decomat-ksp/src/main/kotlin/io/decomat/OutputDirective.kt b/decomat-ksp/src/main/kotlin/io/decomat/OutputDirective.kt deleted file mode 100644 index a72a1e8..0000000 --- a/decomat-ksp/src/main/kotlin/io/decomat/OutputDirective.kt +++ /dev/null @@ -1,27 +0,0 @@ -//package io.decomat -// -//import java.io.File -//import java.io.FileWriter -//import java.io.IOException -//import freemarker.template.TemplateDirectiveModel -//import freemarker.template.TemplateException -//import freemarker.core.Environment -//import freemarker.template.TemplateDirectiveBody -//import freemarker.template.TemplateModel -//import freemarker.template.SimpleScalar -// -//class OutputDirective : TemplateDirectiveModel { -// @Throws(TemplateException::class, IOException::class) -// override fun execute( -// env: Environment, -// params: Map<*, *>, -// loopVars: Array, -// body: TemplateDirectiveBody -// ) { -// val file: SimpleScalar? = params["file"] as SimpleScalar? -// val fw = FileWriter(File(file.toString())) -// body.render(fw) -// fw.flush() -// } -//} -//