Calling a method from Annotation using reflection
问题 I have Sample class with Size annotation case class Sample( attr: SomeTypeA @Size(value = 50) name: SomeTypeB) This Size annotation is a class that implements AnnotationInterface trait AnnotationInterface[T] { def getValue: T } class Size(value: Int) extends StaticAnnotation with AnnotationInterface[Int] { override def getValue: Int = value } And I have Extractor which is responsible for extracting class members using reflection class Extractor[A](implicit tt: TypeTag[A], ct: ClassTag[A] ) {