Skip to content

Commit

Permalink
feat: add findClass method with className
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas authored and oSumAtrIX committed Jun 5, 2022
1 parent 00c85b5 commit 4087f49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/kotlin/app/revanced/patcher/cache/Cache.kt
Expand Up @@ -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
Expand Down

0 comments on commit 4087f49

Please sign in to comment.