I wrote an SDK that is only comprised of static methods. At first I had those methods wrapped in objects like this:
// File 'Name3.kt'
package name1.name2
object Name3 {
fun Function1(): String {...}
}
After, I removed the "object" layer, thinking I would simplify client calls. However, when calling my Android/jvm SDK from a Java client, for instance, it looks awkward since Java doesn't support package-level functions. So it looks like this from the Java client:
import name1.name2.Name3Kt;
void func() {
String s = Name3Kt.Function1();
}
Based on that, shouldn't I revert to my 1st solution of having my static functions wrapped in an object, so the client call (in Java) would look like this instead?
import name1.name2.Name3Kt; //SDK functions at package-level
import name1.name2.Name3; //SDK functions at object-level
String s = Name3Kt.Function1(); //SDK functions at package-level
String s = Name3.Function1(); //SDK functions at object-level