Use the Kotlin wrapper method — it's clean, safe, and doesn't require changes from the library provider.
Alternative Hack (If Kotlin wrapper isn't an option)
You could technically use reflection in Java to instantiate and access the class, but this approach is messy, error-prone, and discouraged unless there's absolutely no other option. Reflection bypasses compile-time checks, meaning you lose type safety, IDE support, and readability — which makes the code much harder to debug, maintain, and scale. It's more of a last-resort workaround than a proper solution.