review/refresh/consolidate handling of Java visibility rules
finish #832