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

com.squareup.anvil.compiler.codegen.CheckOnlyCodeGenerator.kt Maven / Gradle / Ivy

Go to download

The core implementation module for Anvil, responsible for hooking into the Kotlin compiler and orchestrating code generation

There is a newer version: 0.4.0
Show newest version
package com.squareup.anvil.compiler.codegen

import com.squareup.anvil.compiler.api.FileWithContent
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.psi.KtFile
import java.io.File

/**
 * A [PrivateCodeGenerator] that doesn't generate any code, but instead just performs checks.
 */
internal abstract class CheckOnlyCodeGenerator : PrivateCodeGenerator() {

  final override fun generateCodePrivate(
    codeGenDir: File,
    module: ModuleDescriptor,
    projectFiles: Collection,
  ): Collection {
    checkCode(codeGenDir, module, projectFiles)
    return emptyList()
  }

  protected abstract fun checkCode(
    codeGenDir: File,
    module: ModuleDescriptor,
    projectFiles: Collection,
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy