Little Java advanced visitor pattern