mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 09:08:04 +01:00
refactor: rename method to resolverMethod
This commit is contained in:
parent
0f30eac32c
commit
b2dab3fabf
3 changed files with 5 additions and 6 deletions
|
@ -11,7 +11,6 @@ import org.jf.dexlib2.Opcode
|
|||
* @param methodParameters The parameters of the method.
|
||||
* @param opcodes A list of opcodes of the method.
|
||||
*/
|
||||
@Suppress("ArrayInDataClass")
|
||||
data class MethodSignature(
|
||||
val name: String,
|
||||
val metadata: SignatureMetadata,
|
||||
|
@ -46,10 +45,10 @@ data class MethodMetadata(
|
|||
|
||||
/**
|
||||
* Metadata for the Patcher, this contains things like how the Patcher should interpret this signature.
|
||||
* @param method The method the resolver should use to resolve the signature.
|
||||
* @param resolverMethod The method the resolver should use to resolve the signature.
|
||||
*/
|
||||
data class PatcherMetadata(
|
||||
val method: ResolverMethod
|
||||
val resolverMethod: ResolverMethod
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,8 +89,8 @@ internal class SignatureResolver(
|
|||
val pattern = signature.opcodes!!
|
||||
val size = pattern.count()
|
||||
var threshold = 0
|
||||
if (signature.metadata.patcher.method is ResolverMethod.Fuzzy) {
|
||||
threshold = signature.metadata.patcher.method.threshold
|
||||
if (signature.metadata.patcher.resolverMethod is ResolverMethod.Fuzzy) {
|
||||
threshold = signature.metadata.patcher.resolverMethod.threshold
|
||||
}
|
||||
|
||||
for (instructionIndex in 0 until count) {
|
||||
|
|
|
@ -39,7 +39,7 @@ internal class PatcherTest {
|
|||
comment = "Main method of TestClass. Version 1.0.0"
|
||||
),
|
||||
patcher = PatcherMetadata(
|
||||
method = ResolverMethod.Fuzzy(2)
|
||||
resolverMethod = ResolverMethod.Fuzzy(2)
|
||||
)
|
||||
),
|
||||
"V",
|
||||
|
|
Loading…
Reference in a new issue