SQLiteQueryBuilder
SQLiteQueryBuilder copied to clipboard
Use package-private scope
We should consider changing some classes scope from public to package private. This avoids exposing a lot of internal classes that aren't meant to be used outside of the API.
Some examples:
JoinTypeStringUtils
The only troublesome part is that we need to move the tests accordingly to have access to the classes like .StringUtilsTest.java -> .utils.StringUtilsTest.java.
We can move JoinType, StringUtils and other enum classes from api to builder package, and make them package private. This only leaves Builder and SQLiteQueryBuilder in the original place and remove utils package completely. No package change required for unit tests.
This is just my opinion. Let's see what @alexfu would say.
Restructuring the test directory to match up isn't something I'm too worried about. @monxalo your suggestion works for me.
After tinkering with this, i realized that for StringUtils at least, will be hard to make package-private since it's used mostly everywhere.
If we had everything in a single package it would be straightforward but then we sacrifice organization of the classes.
For now, here's what can be made package-private:
JoinType- Contructors in every
Select...Builderclass.