consider "package protected" methods and fields in autoclass #522
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to public, protected, and private visibility, methods and fields can be "package protected".
https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html
Package protected is the visibility setting when none of public, protected, and private are used (and therefore do not have any of those modifiers). The end result is the visibility depends on if the code is in the same package as the class package.
Rather than make a new
autoclass
parameter calledinclude_package_protected
, I made it look at the package names as it goes up the class hierarchy and followinclude_protected
if the package name is not the same as the starting package name. @tshirtman @cmacdonald I believe this is the better choice but am not 100% sure and want to hear what you have to say.This PR also adds some unit test assert statements that should have been added in #500.