Package com. squareup. anvil. compiler. api
Types
Anvil Compilation Exception
Link copied to clipboard
class AnvilCompilationException(message: String, cause: Throwable?, element: PsiElement?) : CompilationException
Content copied to clipboard
AnvilCompilationException is thrown when Anvil specific code can't be processed or an error occurs while generating code.
Anvil Context
Link copied to clipboard
interface AnvilContext
Content copied to clipboard
Contains context about the given Anvil compiler invocation. Considered a read-only API.
Code Generator
Link copied to clipboard
interface CodeGenerator
Content copied to clipboard
This interface allows for easy extension of Anvil's core compiler functionality for cases where you need to generate extra code during compilation.
Generated File
Link copied to clipboard
Represents a generated file that Anvil should eventually write.
Functions
create Generated File
Link copied to clipboard
fun CodeGenerator.createGeneratedFile(codeGenDir: File, packageName: String, fileName: String, content: String): GeneratedFile
Content copied to clipboard
Write content into a new file for the given packageName and fileName. fileName usually refers to the class name.