compiler-plugin / arrow.meta / Meta
interface Meta : ComponentRegistrar,
MetaPluginSyntax
,
InternalRegistry
Meta is the core entry point and impl of Arrow Meta in terms of its registration system and interface with the Kotlin Compiler
Plugin authors are encouraged to define CliPlugin extensions by making them part of the Meta receiver:
val Meta.helloWorld: CliPlugin get() =
"Hello World" {
meta(
...
)
}
The Meta receiver provides automatic syntax for everything the user needs to build plugins through delegation to MetaPluginSyntax and providing the internal implementation to the compiler subscriptions via InternalRegistry
intercept | The Meta plugin supports N numbers of local and remote sub CliPlugin that provide a List of ExtensionPhase subscriptions. registerProjectComponents implementation calls intercept to deliver subscriptions to the Kotlin Compiler in the right order.abstract fun intercept(ctx: CompilerContext ): List < CliPlugin > |
registerProjectComponents | CLI Compiler ComponentRegistrar entry point.open fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration): Unit |
helloWorld | The following example shows a Hello World Compiler Plugin.val Meta .helloWorld: CliPlugin |
higherKindedTypes2 | val Meta .higherKindedTypes2: CliPlugin |
optics | val Meta .optics: CliPlugin |
typeProofs | val Meta .typeProofs: CliPlugin |
binaryExpression | fun Meta .binaryExpression(ctx: CompilerContext , match: KtBinaryExpression.() -> Boolean , map: BinaryExpression .(KtBinaryExpression) -> Transform <KtBinaryExpression>): ExtensionPhase |
blockExpression | fun Meta .blockExpression(ctx: CompilerContext , match: KtBlockExpression.() -> Boolean , map: BlockExpression .(KtBlockExpression) -> Transform <KtBlockExpression>): ExtensionPhase |
breakExpression | fun Meta .breakExpression(ctx: CompilerContext , match: KtBreakExpression.() -> Boolean , map: BreakExpression .(KtBreakExpression) -> Transform <KtBreakExpression>): ExtensionPhase |
catchClause | fun Meta .catchClause(ctx: CompilerContext , match: KtCatchClause.() -> Boolean , map: CatchClause .(KtCatchClause) -> Transform <KtCatchClause>): ExtensionPhase |
classBody | fun Meta .classBody(ctx: CompilerContext , match: KtClassBody.() -> Boolean , map: ClassBody .(KtClassBody) -> Transform <KtClassBody>): ExtensionPhase |
classDeclaration | fun Meta .classDeclaration(ctx: CompilerContext , match: KtClass.() -> Boolean , map: ClassDeclaration .(KtClass) -> Transform <KtClass>): ExtensionPhase |
continueExpression | fun Meta .continueExpression(ctx: CompilerContext , match: KtContinueExpression.() -> Boolean , map: ContinueExpression .(KtContinueExpression) -> Transform <KtContinueExpression>): ExtensionPhase |
destructuringDeclaration | fun Meta .destructuringDeclaration(ctx: CompilerContext , match: KtDestructuringDeclaration.() -> Boolean , map: DestructuringDeclaration .(KtDestructuringDeclaration) -> Transform <KtDestructuringDeclaration>): ExtensionPhase |
dotQualifiedExpression | fun Meta .dotQualifiedExpression(ctx: CompilerContext , match: KtDotQualifiedExpression.() -> Boolean , map: DotQualifiedExpression .(KtDotQualifiedExpression) -> Transform <KtDotQualifiedExpression>): ExtensionPhase |
enableProofCallResolver | fun Meta .enableProofCallResolver(): ExtensionPhase |
file | fun Meta .file(ctx: CompilerContext , match: KtFile.() -> Boolean , map: File .(KtFile) -> Transform <KtFile>): ExtensionPhase |
finallySection | fun Meta .finallySection(ctx: CompilerContext , match: KtFinallySection.() -> Boolean , map: FinallySection .(KtFinallySection) -> Transform <KtFinallySection>): ExtensionPhase |
forExpression | fun Meta .forExpression(ctx: CompilerContext , match: KtForExpression.() -> Boolean , map: ForExpression .(KtForExpression) -> Transform <KtForExpression>): ExtensionPhase |
functionLiteral | fun Meta .functionLiteral(ctx: CompilerContext , match: KtFunctionLiteral.() -> Boolean , map: FunctionLiteral .(KtFunctionLiteral) -> Transform <KtFunctionLiteral>): ExtensionPhase |
ifExpression | fun Meta .ifExpression(ctx: CompilerContext , match: KtIfExpression.() -> Boolean , map: IfExpression .(KtIfExpression) -> Transform <KtIfExpression>): ExtensionPhase |
importDirective | fun Meta .importDirective(ctx: CompilerContext , match: KtImportDirective.() -> Boolean , map: ImportDirective .(KtImportDirective) -> Transform <KtImportDirective>): ExtensionPhase |
isExpression | fun Meta .isExpression(ctx: CompilerContext , match: KtIsExpression.() -> Boolean , map: IsExpression .(KtIsExpression) -> Transform <KtIsExpression>): ExtensionPhase |
lambdaExpression | fun Meta .lambdaExpression(ctx: CompilerContext , match: KtLambdaExpression.() -> Boolean , map: LambdaExpression .(KtLambdaExpression) -> Transform <KtLambdaExpression>): ExtensionPhase |
namedFunction | fun Meta .namedFunction(ctx: CompilerContext , match: KtNamedFunction.() -> Boolean , map: NamedFunction .(KtNamedFunction) -> Transform <KtNamedFunction>): ExtensionPhase |
objectDeclaration | fun Meta .objectDeclaration(ctx: CompilerContext , match: KtObjectDeclaration.() -> Boolean , map: ObjectDeclaration .(KtObjectDeclaration) -> Transform <KtObjectDeclaration>): ExtensionPhase |
packageDirective | fun Meta .packageDirective(ctx: CompilerContext , match: KtPackageDirective.() -> Boolean , map: PackageDirective .(KtPackageDirective) -> Transform <KtPackageDirective>): ExtensionPhase |
parameter | fun Meta .parameter(ctx: CompilerContext , match: KtParameter.() -> Boolean , map: Parameter .(KtParameter) -> Transform <KtParameter>): ExtensionPhase |
property | fun Meta .property(ctx: CompilerContext , match: KtProperty.() -> Boolean , map: Property .(KtProperty) -> Transform <KtProperty>): ExtensionPhase |
propertyAccessor | fun Meta .propertyAccessor(ctx: CompilerContext , match: KtPropertyAccessor.() -> Boolean , map: PropertyAccessor .(KtPropertyAccessor) -> Transform <KtPropertyAccessor>): ExtensionPhase |
provenSyntheticScope | fun Meta .provenSyntheticScope(): ExtensionPhase |
quote | fun <K : KtElement> Meta .quote(ctx: CompilerContext , match: K.() -> Boolean , map: Scope <K>.(K) -> Transform <K>): ExtensionPhase fun <K : KtElement, S : Scope <K>> Meta .quote(ctx: CompilerContext , match: K.() -> Boolean , map: S.(K) -> Transform <K>, transform: (K) -> S): ExtensionPhase fun <P : KtElement, K : KtElement, S : Scope <K>> Meta .quote(ctx: CompilerContext , quoteFactory: Factory<P, K, S>, match: K.() -> Boolean , map: S.(K) -> Transform <K>): ExtensionPhase |
returnExpression | fun Meta .returnExpression(ctx: CompilerContext , match: KtReturnExpression.() -> Boolean , map: ReturnExpression .(KtReturnExpression) -> Transform <KtReturnExpression>): ExtensionPhase |
thisExpression | fun Meta .thisExpression(ctx: CompilerContext , match: KtThisExpression.() -> Boolean , map: ThisExpression .(KtThisExpression) -> Transform <KtThisExpression>): ExtensionPhase |
throwExpression | fun Meta .throwExpression(ctx: CompilerContext , match: KtThrowExpression.() -> Boolean , map: ThrowExpression .(KtThrowExpression) -> Transform <KtThrowExpression>): ExtensionPhase |
tryExpression | fun Meta .tryExpression(ctx: CompilerContext , match: KtTryExpression.() -> Boolean , map: TryExpression .(KtTryExpression) -> Transform <KtTryExpression>): ExtensionPhase |
typeAlias | fun Meta .typeAlias(ctx: CompilerContext , match: KtTypeAlias.() -> Boolean , map: TypeAlias .(KtTypeAlias) -> Transform <KtTypeAlias>): ExtensionPhase |
typeReference | fun Meta .typeReference(ctx: CompilerContext , match: KtTypeReference.() -> Boolean , map: TypeReference .(KtTypeReference) -> Transform <KtTypeReference>): ExtensionPhase |
valueArgument | ”"”someObject.add(${argumentName = argumentExpression}.valueArgument)”””“fun Meta .valueArgument(ctx: CompilerContext , match: KtValueArgument.() -> Boolean , map: ValueArgument .(KtValueArgument) -> Transform <KtValueArgument>): ExtensionPhase |
whenCondition | fun Meta .whenCondition(ctx: CompilerContext , match: KtWhenCondition.() -> Boolean , map: WhenCondition .(KtWhenCondition) -> Transform <KtWhenCondition>): ExtensionPhase |
whenEntry | fun Meta .whenEntry(ctx: CompilerContext , match: KtWhenEntry.() -> Boolean , map: WhenEntry .(KtWhenEntry) -> Transform <KtWhenEntry>): ExtensionPhase |
whenExpression | fun Meta .whenExpression(ctx: CompilerContext , match: KtWhenExpression.() -> Boolean , map: WhenExpression .(KtWhenExpression) -> Transform <KtWhenExpression>): ExtensionPhase |
whileExpression | fun Meta .whileExpression(ctx: CompilerContext , match: KtWhileExpression.() -> Boolean , map: WhileExpression .(KtWhileExpression) -> Transform <KtWhileExpression>): ExtensionPhase |
MetaPlugin | The Meta Plugin contains the default meta bundled plugins for Arrowopen class MetaPlugin : Meta |
Do you like Arrow?
✖