mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
feat: add findClass method with className
This commit is contained in:
parent
00c85b5d75
commit
4087f49863
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue