Lots of possibilities in the JVM to monkey-patch some behavior. Most of them are a bit involved though.