I am trying to annotate a parameter of a case class.
Judging from this question, and and from this scaladoc, it looks like what I am doing should work, but for some reason it does not:
class Foo extends java.lang.annotation.Annotation { def annotationType = getClass }
case class Bar(@Foo @getter bar: String)
classOf[Bar].getDeclaredMethods.map(_.getDeclaredAnnotations.length)
res66: Array[Int] = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Any ideas?