blob: 7a17314085a69ecc6d7dfad6559f565932398ba3 (
plain) (
tree)
|
|
import language.experimental.macros
import scala.reflect.macros.Context
object Macros {
def impl(c: Context) = {
val decls = c.typeOf[JavaClassWithCheckedExceptions_1[_]].declarations.toList
val s = decls.sortBy(_.name.toString).map(decl => (s"${decl.name}: ${decl.annotations}")).mkString(scala.compat.Platform.EOL)
c.universe.reify(println(c.literal(s).splice))
}
def foo = macro impl
}
|