What about "triggers" in Java?
In declarative mode, things like:
after NullPointerException(e) - throws MyException("error");
before return *String ('all String methods) - Logger.info(return)
before NullPointerException - objectX = new Object() and continue;
i thought about several declarations... I'd like to know if you think that something like this could be useful one day. After all java is in constant evolution.