Is there a way to create custom annotations in Scala and write a custom annotation processor to verify the annotations?
问题 I have been learning about annotations and what an annotation processor is. I was looking at Java examples and there seems to be a proper way to do it. However, in Scala, I do not get a proper website/documentation to create custom annotations and annotation processor. If it's not possible in Scala, is there a way to use Java custom annotation processor in Scala classes? Can someone point me in the right direction? 回答1: In Scala there are macro annotations https://docs.scala-lang.org