All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arch.ether.processor.builder.BindingManager.kt Maven / Gradle / Ivy

Go to download

Ether is a framework using PubSub architectures that can be used as a replacement for common model-view archtectures such as MVP/MVC/MVVM etc.

The newest version!
package arch.ether.processor.builder


import java.io.File
import javax.annotation.processing.ProcessingEnvironment
import javax.lang.model.element.Element

/**
 * Builds the abstract data publisher classes
 */
open class BindingManager(private val processingEnvironment: ProcessingEnvironment) {

    companion object {
        const val KAPT_KOTLIN_GENERATED_OPTION_NAME = "kapt.kotlin.generated"
    }

    /**
     * Generates the abstract publisher class
     */
    fun buildPubSubClasses(element: Element) {
        val kaptKotlinGeneratedDir = processingEnvironment.options[KAPT_KOTLIN_GENERATED_OPTION_NAME]?.replace("kaptKotlin", "kapt")
        EtherStubsBuilder(element, this).build().writeTo(File(kaptKotlinGeneratedDir))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy