mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 09:08:04 +01:00
feat: add findClass method with className
This commit is contained in:
parent
aec5eeb597
commit
78235d1abe
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
|
// if the class proxy already exists in the cached proxy list below
|
||||||
internal val classProxy = mutableSetOf<ClassProxy>()
|
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
|
* Find a class by a given predicate
|
||||||
* @return A proxy for the first class that matches the predicate
|
* @return A proxy for the first class that matches the predicate
|
||||||
|
|
Loading…
Reference in a new issue