Typing away effective java code