clark
08/11/2022, 2:53 PM@Target(AnnotationTarget.FUNCTION)
annotation class DefaultErrorMessage(val defaultErrorMessage: String)
@DefaultErrorMessage("This is a test")
fun testErrorMessage() {
// How do I access the DefaultErrorMessage?
}
Also, would it be possible to access that message from a function called by the annotated function for example:
@Target(AnnotationTarget.FUNCTION)
annotation class DefaultErrorMessage(val defaultErrorMessage: String)
@DefaultErrorMessage("This is a test")
fun testErrorMessage() {
testNestedAccess()
}
fun testNestedAccess() {
// How do I access default error message?
}