Java’s Reflection API supports dynamic metaprogramming with one limitation: it
is read-only; that is, it can only be used to have a program examine itself at
runtime. It can not be used to have the running program modify itself. Static
metaprogramming in Java is currently impossible because Java simply does not
have templates or macros. There are Java source code preprocessors available but
these are not part of the language standard.