Created
May 15, 2024 13:45
-
-
Save Jolanrensen/e735feea5746fb80eb03108b5f1b119d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2024-05-15T13:43:04.279042Z", | |
"start_time": "2024-05-15T13:43:04.129745Z" | |
} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"annotation class Ann\n", | |
"\n", | |
"USE {\n", | |
" onClassAnnotation<Ann> { \n", | |
" println(\"found: ${it.map { it.qualifiedName }}\")\n", | |
" }\n", | |
"}" | |
], | |
"outputs": [], | |
"execution_count": 4 | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2024-05-15T13:44:59.561466Z", | |
"start_time": "2024-05-15T13:44:59.510463Z" | |
} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"@Ann\n", | |
"interface A {\n", | |
" val a: Int\n", | |
"}\n", | |
"\n", | |
"interface B {\n", | |
" @Ann\n", | |
" interface C {\n", | |
" val c: Int\n", | |
" }\n", | |
"}" | |
], | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"found: [Line_8_jupyter.A]\n" | |
] | |
} | |
], | |
"execution_count": 8 | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "code", | |
"outputs": [], | |
"execution_count": null, | |
"source": "" | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Kotlin", | |
"language": "kotlin", | |
"name": "kotlin" | |
}, | |
"language_info": { | |
"name": "kotlin", | |
"version": "1.9.0", | |
"mimetype": "text/x-kotlin", | |
"file_extension": ".kt", | |
"pygments_lexer": "kotlin", | |
"codemirror_mode": "text/x-kotlin", | |
"nbconvert_exporter": "" | |
}, | |
"ktnbPluginMetadata": { | |
"projectLibraries": [] | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment