I\'ve the following java Annotation defined
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.FIELD})
@Retenti
Quentin's solution worked, but IMHO it's too much boilerplate for the user.
You can read annotations on the constructor arguments with the standard reflection API. I needed this for a macro implementation.
scala> :paste
// Entering paste mode (ctrl-D to finish)
import scala.annotation.StaticAnnotation
final class min(i: Long) extends StaticAnnotation
case class Foo(@min(1) c: String)
import scala.reflect.runtime.universe._
symbolOf[Foo].asClass.primaryConstructor.typeSignature.paramLists.head.head.annotations
// Exiting paste mode, now interpreting.
import scala.annotation.StaticAnnotation
defined class min
defined class Foo
import scala.reflect.runtime.universe._
res0: List[reflect.runtime.universe.Annotation] = List(min(1L))