ReflectionUtils

Internal class. Do not use.

Functions

Link copied to clipboard
fun constructObjectQuietly(classpath: String, parameterTypes: List<Class<*>> = emptyList(), args: List<Any?> = emptyList()): Any?

Invokes a constructor and consumes all errors.

Link copied to clipboard
fun doesMethodExist(className: String, methodName: String, vararg parameterTypes: Class<*>?): Boolean

Checks if the provided className & method exists on the classpath. Note that the provided class should most likely be present in the consumer proguard rules in order for this check to work in obfuscated environments!

Link copied to clipboard
fun getMethodQuietly(clazz: Class<*>, methodName: String, vararg parameterTypes: Class<*>?): Method?
fun getMethodQuietly(className: String, methodName: String, vararg parameterTypes: Class<*>?): Method?
Link copied to clipboard
fun invokeMethodQuietly(receiver: Any?, method: Method, vararg args: Any?): Any?