The best option you have is obfuscating your code before publicizing.
The basic idea is to replace all "readable" names (say, "fetchTaxRate") with meaningless names as short as possible (say, "a"). If you have an instruction in your source "taxManager.fetchTaxRate(customerClass, countryID);" that might end up being "aB.e(zY, Q);" and anyone trying to decompile the binary will get to see the latter not the former.
A good article on obfuscation is at https://www.excelsior-usa.com/articles/java-obfuscators.html
The article also has a list of obfuscators and the one I use personally to my satisfaction (ProGuard) is among the list.