mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-13 02:14:27 +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 methodParameters The parameters of the method.
|
||||||
* @param opcodes A list of opcodes of the method.
|
* @param opcodes A list of opcodes of the method.
|
||||||
*/
|
*/
|
||||||
@Suppress("ArrayInDataClass")
|
|
||||||
data class MethodSignature(
|
data class MethodSignature(
|
||||||
val name: String,
|
val name: String,
|
||||||
val metadata: SignatureMetadata,
|
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.
|
* 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(
|
data class PatcherMetadata(
|
||||||
val method: ResolverMethod
|
val resolverMethod: ResolverMethod
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -89,8 +89,8 @@ internal class SignatureResolver(
|
||||||
val pattern = signature.opcodes!!
|
val pattern = signature.opcodes!!
|
||||||
val size = pattern.count()
|
val size = pattern.count()
|
||||||
var threshold = 0
|
var threshold = 0
|
||||||
if (signature.metadata.patcher.method is ResolverMethod.Fuzzy) {
|
if (signature.metadata.patcher.resolverMethod is ResolverMethod.Fuzzy) {
|
||||||
threshold = signature.metadata.patcher.method.threshold
|
threshold = signature.metadata.patcher.resolverMethod.threshold
|
||||||
}
|
}
|
||||||
|
|
||||||
for (instructionIndex in 0 until count) {
|
for (instructionIndex in 0 until count) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ internal class PatcherTest {
|
||||||
comment = "Main method of TestClass. Version 1.0.0"
|
comment = "Main method of TestClass. Version 1.0.0"
|
||||||
),
|
),
|
||||||
patcher = PatcherMetadata(
|
patcher = PatcherMetadata(
|
||||||
method = ResolverMethod.Fuzzy(2)
|
resolverMethod = ResolverMethod.Fuzzy(2)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"V",
|
"V",
|
||||||
|
|
Loading…
Reference in a new issue