igor.wojda
06/13/2017, 11:44 PMconst
modifier) ?agomez
06/13/2017, 11:45 PMigor.wojda
06/14/2017, 12:06 AMconst
exist. isn't it? e.g. annotation processor must know argument value at compile time and val is not accepted
val answer: Int = 42
const val MAX_LOG_ENTRIES = 100
@MyLogger(MAX_LOG_ENTRIES ) // OK
class Test {}
@MyLogger(answer) // error
class Test2 {}
annotation class MyLogger(val value: Int)
agomez
06/14/2017, 12:53 AMagomez
06/14/2017, 12:54 AMval outStream = FileOutputStream("/tmp/foo")
agomez
06/14/2017, 12:55 AMagomez
06/14/2017, 12:55 AMigor.wojda
06/14/2017, 6:59 AM