From 7f44174d91f0af0d50a83d80a7103c779241e094 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 1 Aug 2024 17:53:48 +0200 Subject: [PATCH] fix: Make constructor internal as supposed --- api/revanced-patcher.api | 1 - src/main/kotlin/app/revanced/patcher/Fingerprint.kt | 3 +-- src/main/kotlin/app/revanced/patcher/patch/Patch.kt | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/revanced-patcher.api b/api/revanced-patcher.api index 3091f38..483c7d6 100644 --- a/api/revanced-patcher.api +++ b/api/revanced-patcher.api @@ -149,7 +149,6 @@ public final class app/revanced/patcher/patch/BytecodePatchBuilder : app/revance } public final class app/revanced/patcher/patch/BytecodePatchBuilder$InvokedFingerprint { - public fun (Lapp/revanced/patcher/Fingerprint;)V public final fun getValue (Ljava/lang/Void;Lkotlin/reflect/KProperty;)Lapp/revanced/patcher/Match; } diff --git a/src/main/kotlin/app/revanced/patcher/Fingerprint.kt b/src/main/kotlin/app/revanced/patcher/Fingerprint.kt index 8493bfa..4d4594b 100644 --- a/src/main/kotlin/app/revanced/patcher/Fingerprint.kt +++ b/src/main/kotlin/app/revanced/patcher/Fingerprint.kt @@ -3,8 +3,7 @@ package app.revanced.patcher import app.revanced.patcher.extensions.InstructionExtensions.instructionsOrNull -import app.revanced.patcher.patch.BytecodePatchBuilder -import app.revanced.patcher.patch.BytecodePatchContext +import app.revanced.patcher.patch.* import app.revanced.patcher.patch.BytecodePatchContext.LookupMaps.Companion.appendParameters import app.revanced.patcher.patch.MethodClassPairs import app.revanced.patcher.util.proxy.ClassProxy diff --git a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt index 6c089ab..39bd930 100644 --- a/src/main/kotlin/app/revanced/patcher/patch/Patch.kt +++ b/src/main/kotlin/app/revanced/patcher/patch/Patch.kt @@ -396,7 +396,7 @@ class BytecodePatchBuilder internal constructor( */ operator fun Fingerprint.invoke() = InvokedFingerprint(also { fingerprints.add(it) }) - class InvokedFingerprint(private val fingerprint: Fingerprint) { + class InvokedFingerprint internal constructor(private val fingerprint: Fingerprint) { // The reason getValue isn't extending the Fingerprint class is // because delegating makes only sense if the fingerprint was previously added to the patch by invoking it. // It may be likely to forget invoking it. By wrapping the fingerprint into this class,