In short: no.
Macro types (i.e. macros that generate types instead of methods) are planned, but they are not designed nor specified, let alone implemented yet, and they won't be for 2.10.
Also, a single macro invocation can only generate a single type. However, since types (specifically, object
s) can be nested, this is not a limitation: you can just generate a single top-level object
containing all the classes you need. The difference between this and your code is basically one additional import
statement:
package org.smth
type O = Generate(params)
// becomes
object O {
class A { ... }
object B { ... }
case class C { ... }
}
// which means you need an additional
import O._
They thought about package
macros that can generate entire packages full of classes, but realized that since object
s are a superset of package
s and type macros can generate object
s that wouldn't be necessary.