Reflection Utils
object ReflectionUtils
Internal class. Do not use.
Functions
Link copied to clipboard
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 getDeclaredMethodQuietly(className: String, methodName: String, vararg parameterTypes: Class<*>?): Method?
Finds a declared (private/protected) method of a class. If it's not found in the class, it will iterate through parents until it is found or there are no more parents.
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