feat: add findClass method with className

This commit is contained in:
Lucaskyy 2022-03-31 23:22:14 +02:00 committed by oSumAtrIX
parent 00c85b5d75
commit 4087f49863
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -13,6 +13,12 @@ class Cache(
// if the class proxy already exists in the cached proxy list below
internal val classProxy = mutableSetOf<ClassProxy>()
/**
* Find a class by a given class name
* @return A proxy for the first class that matches the class name
*/
fun findClass(className: String) = findClass { it.type.contains(className) }
/**
* Find a class by a given predicate
* @return A proxy for the first class that matches the predicate