extract from unite-javaimport, and modified.