Make analysis of Java classes more robust

When trying to look up a "getInstance" method on a Java class,
it's necessary to catch more exceptions.
Merge pull request #219 from scala/fix-java-getinstance

Make analysis of Java classes more robust