I am a fan of static metaprogramming in C++. I know Java now has generics. Does this mean that static metaprogramming (i.e., compile-time program execution) is possible in
The Manifold project offers type-safe static metaprogramming for Java. You can use it to build types dynamically at compile-time as Javac resolves type names. The JSON Schema demo demonstrates static metaprogramming in terms of dynamic, compile-time type projection (no code generation build steps).
Additionally you can use Manifold to add new features. Check out Structural Typing, Method Extensions, and Type-safe Reflection. .