compiler-plugin / arrow.meta.phases / CompilerContext

CompilerContext

open class CompilerContext : ElementScope

The Compiler Context represents the environment received by all plugins. The Compiler Context will get more services as they become relevant overtime to the development of compiler plugins.

Constructors

| <init> | The Compiler Context represents the environment received by all plugins. The Compiler Context will get more services as they become relevant overtime to the development of compiler plugins.CompilerContext(project: Project, messageCollector: MessageCollector? = null, scope: ElementScope = ElementScope.default(project), ktPsiElementFactory: KtPsiFactory = KtPsiFactory(project, false), eval: (String) -> Any? = { KotlinJsr223JvmLocalScriptEngineFactory().scriptEngine.eval(it) }) |

Properties

componentProvider var componentProvider: ComponentProvider?
configuration var configuration: CompilerConfiguration?
ctx val ctx: CompilerContext
eval val eval: (String) -> Any?
ktPsiElementFactory val ktPsiElementFactory: KtPsiFactory
messageCollector val messageCollector: MessageCollector?
module var module: ModuleDescriptor?
project open val project: Project
proofs val ModuleDescriptor?.proofs: List<Proof>
scope val scope: ElementScope

Extension Functions

areTypesCoerced fun CompilerContext.areTypesCoerced(subType: KotlinType, supertype: KotlinType): Boolean
changeSource fun CompilerContext.changeSource(file: KtFile, newSource: String, rootFile: KtFile): KtFile
coerceProof fun CompilerContext.coerceProof(subType: KotlinType, superType: KotlinType): ExtensionProof?
coerceProofs fun CompilerContext.coerceProofs(subType: KotlinType, superType: KotlinType): List<ExtensionProof>
extending fun CompilerContext.extending(types: Collection<KotlinType>): List<ExtensionProof>
extensionProof fun CompilerContext.extensionProof(subType: KotlinType, superType: KotlinType): Proof?
extensionProofs fun CompilerContext.extensionProofs(subType: KotlinType, superType: KotlinType): List<ExtensionProof>
generateGivenExtensionsFile fun CompilerContext.generateGivenExtensionsFile(meta: Meta): ExtensionPhase
givenProofs fun CompilerContext.givenProofs(superType: KotlinType): List<GivenProof>
suppressConstantExpectedTypeMismatch fun CompilerContext.suppressConstantExpectedTypeMismatch(diagnostic: Diagnostic): Boolean
suppressProvenTypeMismatch fun CompilerContext.suppressProvenTypeMismatch(diagnostic: Diagnostic): Boolean
suppressTypeInferenceExpectedTypeMismatch fun CompilerContext.suppressTypeInferenceExpectedTypeMismatch(diagnostic: Diagnostic): Boolean
syntheticMemberFunctions fun CompilerContext.syntheticMemberFunctions(receiverTypes: Collection<KotlinType>, name: Name): List<SimpleFunctionDescriptor>
fun CompilerContext.syntheticMemberFunctions(receiverTypes: Collection<KotlinType>): List<SimpleFunctionDescriptor>
transformFile fun <K : KtElement> CompilerContext.transformFile(ktFile: KtFile, mutations: ArrayList<Transform<K>>, match: K.() -> Boolean): List<KtFile>
updateFile fun <K : KtElement> CompilerContext.updateFile(mutations: ArrayList<Transform<K>>, file: KtFile, match: K.() -> Boolean): List<KtFile>
updateFiles fun <K : KtElement> CompilerContext.updateFiles(result: ArrayList<KtFile>, fileMutations: List<Pair<KtFile, ArrayList<Transform<K>>>>, match: K.() -> Boolean): Unit
validateConstructorCall fun CompilerContext.validateConstructorCall(call: ResolvedCall<*>): Validation

Do you like Arrow?

Arrow Org
<