Generate annotations for single-file classes.

This commit is contained in:
Dmitry Petrov
2015-09-15 18:48:29 +03:00
parent b179b861a6
commit 7f4ae52517
10 changed files with 125 additions and 5 deletions
@@ -0,0 +1,9 @@
@file:StringHolder("OK")
@file:JvmName("FileClass")
@Target(AnnotationTarget.FILE)
@Retention(AnnotationRetention.RUNTIME)
public annotation class StringHolder(val value: String)
fun box(): String =
Class.forName("FileClass").getAnnotation(StringHolder::class.java)?.value ?: "null"