> If you have a public method, that refers to a package-private class, nobody > can really use that public > method you exposed.
There is one exception that involves subclasses (not talking about javadoc links to the declaring class now). If you have a package-private class with a public method and inherit (within the same package) to a public class then that method can be used in the public class (and you cannot reduce the visibility of that public method, it remains public). This kind of trick is used to hide scaffolding classes that are exposed from multiple points, for example java.lang.AbstractStringBuilder (pkg-private) and StringBuilder, StringBuffer. I can be a smartass here but only because I painfully and methodically debugged some quirky obfuscation errors resulting from this issue (in proguard)... Dawid --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org