There are many questions about passing an array as a parameter to the annotation; this is not a hoax.
I would like to use Java-land annotation, which takes an array of annotations as a parameter, for example.
@ManagedOperation @ManagedOperationParameters({ @ManagedOperationParameter(name="start"), @ManagedOperationParameter(name="end") }) def stuff(start: String, end: String): Unit = ???
But this is not valid syntax in Scala, not
@ManagedOperation @ManagedOperationParameters(Array( @ManagedOperationParameter(name="start"), @ManagedOperationParameter(name="end") )) def stuff(start: String, end: String): Unit = ???
so is this the right way to do it if possible?
By the way, I even checked all github to see if any Scala devs use this annotation (Spring JMX).
spring scala annotations
fommil
source share