1
mirror of https://github.com/revanced/revanced-patcher synced 2025-09-13 18:30:49 +02:00

Compare commits

...

7 Commits

Author SHA1 Message Date
semantic-release-bot
76c262ff12 chore(release): 20.0.0-dev.2 [skip ci]
# [20.0.0-dev.2](https://github.com/ReVanced/revanced-patcher/compare/v20.0.0-dev.1...v20.0.0-dev.2) (2024-07-31)

### Bug Fixes

* Downgrade smali to fix dex compilation issue ([714447d](714447de70))
* Merge all extensions before initializing lookup maps ([328aa87](328aa876d8))
* Use null for compatible package version when adding packages only ([a8e8fa4](a8e8fa4093))
2024-07-31 00:27:24 +00:00
oSumAtrIX
714447de70 fix: Downgrade smali to fix dex compilation issue 2024-07-31 02:25:32 +02:00
oSumAtrIX
328aa876d8 fix: Merge all extensions before initializing lookup maps 2024-07-26 04:45:31 +02:00
oSumAtrIX
a8e8fa4093 fix: Use null for compatible package version when adding packages only 2024-07-26 03:41:32 +02:00
oSumAtrIX
c482dff17c refactor: Convert method bodies to single expression functions 2024-07-26 03:10:08 +02:00
oSumAtrIX
e6de1f6b4c build(Needs bump): Bump dependencies 2024-07-26 03:09:32 +02:00
oSumAtrIX
82a2b3c371 docs: Fix syntax issues and improve wording 2024-07-23 19:55:30 +02:00
34 changed files with 269 additions and 328 deletions

View File

@@ -1,3 +1,12 @@
# [20.0.0-dev.2](https://github.com/ReVanced/revanced-patcher/compare/v20.0.0-dev.1...v20.0.0-dev.2) (2024-07-31)
### Bug Fixes
* Downgrade smali to fix dex compilation issue ([714447d](https://github.com/ReVanced/revanced-patcher/commit/714447de70096bf736e8e1d31c14bb5f24195070))
* Merge all extensions before initializing lookup maps ([328aa87](https://github.com/ReVanced/revanced-patcher/commit/328aa876d8ed7826be3713754b6404195e9fe84b))
* Use null for compatible package version when adding packages only ([a8e8fa4](https://github.com/ReVanced/revanced-patcher/commit/a8e8fa4093deb8cffbd7a582409f41867f6b568b))
# [20.0.0-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v19.3.1...v20.0.0-dev.1) (2024-07-22) # [20.0.0-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v19.3.1...v20.0.0-dev.1) (2024-07-22)

View File

@@ -67,7 +67,8 @@ public final class app/revanced/patcher/PatcherConfig {
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
} }
public final class app/revanced/patcher/PatcherContext { public final class app/revanced/patcher/PatcherContext : java/io/Closeable {
public fun close ()V
public final fun getPackageMetadata ()Lapp/revanced/patcher/PackageMetadata; public final fun getPackageMetadata ()Lapp/revanced/patcher/PackageMetadata;
} }
@@ -152,9 +153,10 @@ public final class app/revanced/patcher/patch/BytecodePatchBuilder$InvokedFinger
public final fun getValue (Ljava/lang/Void;Lkotlin/reflect/KProperty;)Lapp/revanced/patcher/Match; public final fun getValue (Ljava/lang/Void;Lkotlin/reflect/KProperty;)Lapp/revanced/patcher/Match;
} }
public final class app/revanced/patcher/patch/BytecodePatchContext : app/revanced/patcher/patch/PatchContext { public final class app/revanced/patcher/patch/BytecodePatchContext : app/revanced/patcher/patch/PatchContext, java/io/Closeable {
public final fun classBy (Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/util/proxy/ClassProxy; public final fun classBy (Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/util/proxy/ClassProxy;
public final fun classByType (Ljava/lang/String;)Lapp/revanced/patcher/util/proxy/ClassProxy; public final fun classByType (Ljava/lang/String;)Lapp/revanced/patcher/util/proxy/ClassProxy;
public fun close ()V
public synthetic fun get ()Ljava/lang/Object; public synthetic fun get ()Ljava/lang/Object;
public fun get ()Ljava/util/Set; public fun get ()Ljava/util/Set;
public final fun getClasses ()Lapp/revanced/patcher/util/ProxyClassList; public final fun getClasses ()Lapp/revanced/patcher/util/ProxyClassList;

View File

@@ -115,9 +115,9 @@ val disableAdsPatch = bytecodePatch(
Patches can have options to get and set before a patch is executed. Patches can have options to get and set before a patch is executed.
Options are useful for making patches configurable. Options are useful for making patches configurable.
After loading the patches using `PatchLoader`, options can be set for a patch. After loading the patches using `PatchLoader`, options can be set for a patch.
Multiple types are already inbuilt in ReVanced Patcher and are supported by any application that uses ReVanced Patcher. Multiple types are already built into ReVanced Patcher and are supported by any application that uses ReVanced Patcher.
To define an option, use available `option` functions: To define an option, use the available `option` functions:
```kt ```kt
val patch = bytecodePatch(name = "Patch") { val patch = bytecodePatch(name = "Patch") {
@@ -151,7 +151,7 @@ option.type // The KType of the option.
### 🧩 Extensions ### 🧩 Extensions
An extension is a precompiled DEX file that is merged into the patched app before a patch is executed. An extension is a precompiled DEX file merged into the patched app before a patch is executed.
While patches are compile-time constructs, extensions are runtime constructs While patches are compile-time constructs, extensions are runtime constructs
that extend the patched app with additional classes. that extend the patched app with additional classes.
@@ -232,13 +232,13 @@ The same order is followed for multiple patches depending on the patch.
## 💡 Additional tips ## 💡 Additional tips
- When using ´PatchLoader` to load patches, only patches with a name are loaded. - When using `PatchLoader` to load patches, only patches with a name are loaded.
Refer to the inline documentation of `PatchLoader` for detailed information. Refer to the inline documentation of `PatchLoader` for detailed information.
- Patches can depend on others. Dependencies are executed first. - Patches can depend on others. Dependencies are executed first.
The dependent patch will not be executed if a dependency raises an exception while executing. The dependent patch will not be executed if a dependency raises an exception while executing.
- A patch can declare compatibility with specific packages and versions, - A patch can declare compatibility with specific packages and versions,
but patches can still be executed on any package or version. but patches can still be executed on any package or version.
It is recommended to declare compatibility to present known compatible packages and versions. It is recommended that compatibility is specified to present known compatible packages and versions.
- If `compatibleWith` is not used, the patch is treated as compatible with any package - If `compatibleWith` is not used, the patch is treated as compatible with any package
- If a package is specified with no versions, the patch is compatible with any version of the package - If a package is specified with no versions, the patch is compatible with any version of the package
- If an empty array of versions is specified, the patch is not compatible with any version of the package. - If an empty array of versions is specified, the patch is not compatible with any version of the package.

View File

@@ -1,3 +1,3 @@
org.gradle.parallel = true org.gradle.parallel = true
org.gradle.caching = true org.gradle.caching = true
version = 20.0.0-dev.1 version = 20.0.0-dev.2

View File

@@ -1,12 +1,14 @@
[versions] [versions]
android = "4.1.1.4" android = "4.1.1.4"
apktool-lib = "2.9.3" apktool-lib = "2.9.3"
kotlin = "1.9.22" kotlin = "2.0.0"
kotlinx-coroutines-core = "1.7.3" kotlinx-coroutines-core = "1.8.1"
mockk = "1.13.10" mockk = "1.13.10"
multidexlib2 = "3.0.3.r3" multidexlib2 = "3.0.3.r3"
# Tracking https://github.com/google/smali/issues/64.
#noinspection GradleDependency
smali = "3.0.5" smali = "3.0.5"
binary-compatibility-validator = "0.14.0" binary-compatibility-validator = "0.15.1"
xpp3 = "1.1.4c" xpp3 = "1.1.4c"
[libraries] [libraries]

View File

@@ -39,9 +39,6 @@ class Patcher(private val config: PatcherConfig) : Closeable {
patch.addRecursively() patch.addRecursively()
} }
fun Patch<*>.anyRecursively(predicate: (Patch<*>) -> Boolean): Boolean =
predicate(this) || dependencies.any { dependency -> dependency.anyRecursively(predicate) }
context.allPatches.let { allPatches -> context.allPatches.let { allPatches ->
// Check, if what kind of resource mode is required. // Check, if what kind of resource mode is required.
config.resourceMode = if (allPatches.any { patch -> patch.anyRecursively { it is ResourcePatch } }) { config.resourceMode = if (allPatches.any { patch -> patch.anyRecursively { it is ResourcePatch } }) {
@@ -99,6 +96,17 @@ class Patcher(private val config: PatcherConfig) : Closeable {
context.resourceContext.decodeResources(config.resourceMode) context.resourceContext.decodeResources(config.resourceMode)
} }
logger.info("Merging extensions")
context.executablePatches.forEachRecursively { patch ->
if (patch is BytecodePatch && patch.extension != null) {
context.bytecodeContext.merge(patch.extension)
}
}
// Initialize lookup maps.
context.bytecodeContext.lookupMaps
logger.info("Executing patches") logger.info("Executing patches")
val executedPatches = LinkedHashMap<Patch<*>, PatchResult>() val executedPatches = LinkedHashMap<Patch<*>, PatchResult>()
@@ -146,7 +154,7 @@ class Patcher(private val config: PatcherConfig) : Closeable {
} }
} }
override fun close() = context.bytecodeContext.lookupMaps.close() override fun close() = context.close()
/** /**
* Compile and save patched APK files. * Compile and save patched APK files.

View File

@@ -5,6 +5,7 @@ import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.ResourcePatchContext import app.revanced.patcher.patch.ResourcePatchContext
import brut.androlib.apk.ApkInfo import brut.androlib.apk.ApkInfo
import brut.directory.ExtFile import brut.directory.ExtFile
import java.io.Closeable
/** /**
* A context for the patcher containing the current state of the patcher. * A context for the patcher containing the current state of the patcher.
@@ -12,7 +13,7 @@ import brut.directory.ExtFile
* @param config The configuration for the patcher. * @param config The configuration for the patcher.
*/ */
@Suppress("MemberVisibilityCanBePrivate") @Suppress("MemberVisibilityCanBePrivate")
class PatcherContext internal constructor(config: PatcherConfig) { class PatcherContext internal constructor(config: PatcherConfig): Closeable {
/** /**
* [PackageMetadata] of the supplied [PatcherConfig.apkFile]. * [PackageMetadata] of the supplied [PatcherConfig.apkFile].
*/ */
@@ -37,4 +38,6 @@ class PatcherContext internal constructor(config: PatcherConfig) {
* The context for patches containing the current state of the bytecode. * The context for patches containing the current state of the bytecode.
*/ */
internal val bytecodeContext = BytecodePatchContext(config) internal val bytecodeContext = BytecodePatchContext(config)
override fun close() = bytecodeContext.close()
} }

View File

@@ -31,7 +31,9 @@ import java.util.logging.Logger
* @param config The [PatcherConfig] used to create this context. * @param config The [PatcherConfig] used to create this context.
*/ */
@Suppress("MemberVisibilityCanBePrivate") @Suppress("MemberVisibilityCanBePrivate")
class BytecodePatchContext internal constructor(private val config: PatcherConfig) : PatchContext<Set<PatcherResult.PatchedDexFile>> { class BytecodePatchContext internal constructor(private val config: PatcherConfig) :
PatchContext<Set<PatcherResult.PatchedDexFile>>,
Closeable {
private val logger = Logger.getLogger(BytecodePatchContext::class.java.name) private val logger = Logger.getLogger(BytecodePatchContext::class.java.name)
/** /**
@@ -57,6 +59,13 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
*/ */
internal val lookupMaps by lazy { LookupMaps(classes) } internal val lookupMaps by lazy { LookupMaps(classes) }
/**
* A map for lookup by [merge].
*/
internal val classesByType = mutableMapOf<String, ClassDef>().apply {
classes.forEach { classDef -> put(classDef.type, classDef) }
}
/** /**
* Merge an extension to [classes]. * Merge an extension to [classes].
* *
@@ -66,11 +75,11 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
val extension = extensionInputStream.readAllBytes() val extension = extensionInputStream.readAllBytes()
RawDexIO.readRawDexFile(extension, 0, null).classes.forEach { classDef -> RawDexIO.readRawDexFile(extension, 0, null).classes.forEach { classDef ->
val existingClass = lookupMaps.classesByType[classDef.type] ?: run { val existingClass = classesByType[classDef.type] ?: run {
logger.fine("Adding class \"$classDef\"") logger.fine("Adding class \"$classDef\"")
lookupMaps.classesByType[classDef.type] = classDef
classes += classDef classes += classDef
classesByType[classDef.type] = classDef
return@forEach return@forEach
} }
@@ -254,6 +263,12 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
methodsByStrings.clear() methodsByStrings.clear()
} }
} }
override fun close() {
lookupMaps.close()
classesByType.clear()
classes.clear()
}
} }
/** /**

View File

@@ -85,6 +85,31 @@ sealed class Patch<C : PatchContext<*>>(
override fun toString() = name ?: "Patch" override fun toString() = name ?: "Patch"
} }
internal fun Patch<*>.anyRecursively(
visited: MutableSet<Patch<*>> = mutableSetOf(),
predicate: (Patch<*>) -> Boolean,
): Boolean {
if (this in visited) return false
if (predicate(this)) return true
visited += this
return dependencies.any { it.anyRecursively(visited, predicate) }
}
internal fun Iterable<Patch<*>>.forEachRecursively(
visited: MutableSet<Patch<*>> = mutableSetOf(),
action: (Patch<*>) -> Unit,
): Unit = forEach {
if (it in visited) return@forEach
visited += it
action(it)
it.dependencies.forEachRecursively(visited, action)
}
/** /**
* A bytecode patch. * A bytecode patch.
* *
@@ -127,7 +152,6 @@ class BytecodePatch internal constructor(
finalizeBlock, finalizeBlock,
) { ) {
override fun execute(context: PatcherContext) = with(context.bytecodeContext) { override fun execute(context: PatcherContext) = with(context.bytecodeContext) {
extension?.let(::merge)
fingerprints.forEach { it.match(this) } fingerprints.forEach { it.match(this) }
execute(this) execute(this)
@@ -268,7 +292,14 @@ sealed class PatchBuilder<C : PatchContext<*>>(
* *
* @param versions The versions of the package. * @param versions The versions of the package.
*/ */
operator fun String.invoke(vararg versions: String) = this to versions.toSet() operator fun String.invoke(vararg versions: String) = invoke(versions.toSet())
/**
* Create a package a patch is compatible with.
*
* @param versions The versions of the package.
*/
private operator fun String.invoke(versions: Set<String>? = null) = this to versions
/** /**
* Add packages the patch is compatible with. * Add packages the patch is compatible with.
@@ -325,6 +356,16 @@ sealed class PatchBuilder<C : PatchContext<*>>(
internal abstract fun build(): Patch<C> internal abstract fun build(): Patch<C>
} }
/**
* Builds a [Patch].
*
* @param B The [PatchBuilder] to build the patch with.
* @param block The block to build the patch.
*
* @return The built [Patch].
*/
private fun <B : PatchBuilder<*>> B.buildPatch(block: B.() -> Unit = {}) = apply(block).build()
/** /**
* A [BytecodePatchBuilder] builder. * A [BytecodePatchBuilder] builder.
* *
@@ -358,7 +399,7 @@ class BytecodePatchBuilder internal constructor(
// It may be likely to forget invoking it. By wrapping the fingerprint into this class, // It may be likely to forget invoking it. By wrapping the fingerprint into this class,
// the compiler will throw an error if the fingerprint was not invoked if attempting to delegate the match. // the compiler will throw an error if the fingerprint was not invoked if attempting to delegate the match.
operator fun getValue(nothing: Nothing?, property: KProperty<*>) = fingerprint.match operator fun getValue(nothing: Nothing?, property: KProperty<*>) = fingerprint.match
?: throw PatchException("No fingerprint match to delegate to ${property.name}.") ?: throw PatchException("No fingerprint match to delegate to \"${property.name}\".")
} }
// Must be internal for the inlined function "extendWith". // Must be internal for the inlined function "extendWith".
@@ -372,9 +413,10 @@ class BytecodePatchBuilder internal constructor(
* *
* @param extension The name of the extension resource. * @param extension The name of the extension resource.
*/ */
@Suppress("NOTHING_TO_INLINE")
inline fun extendWith(extension: String) = apply { inline fun extendWith(extension: String) = apply {
this.extension = object {}.javaClass.classLoader.getResourceAsStream(extension) this.extension = object {}.javaClass.classLoader.getResourceAsStream(extension)
?: throw PatchException("Extension resource \"$extension\" not found") ?: throw PatchException("Extension \"$extension\" not found")
} }
override fun build() = BytecodePatch( override fun build() = BytecodePatch(
@@ -391,6 +433,24 @@ class BytecodePatchBuilder internal constructor(
) )
} }
/**
* Create a new [BytecodePatch].
*
* @param name The name of the patch.
* If null, the patch is named "Patch" and will not be loaded by [PatchLoader].
* @param description The description of the patch.
* @param use Weather or not the patch should be used.
* @param block The block to build the patch.
*
* @return The created [BytecodePatch].
*/
fun bytecodePatch(
name: String? = null,
description: String? = null,
use: Boolean = true,
block: BytecodePatchBuilder.() -> Unit = {},
) = BytecodePatchBuilder(name, description, use).buildPatch(block) as BytecodePatch
/** /**
* A [RawResourcePatch] builder. * A [RawResourcePatch] builder.
* *
@@ -418,6 +478,23 @@ class RawResourcePatchBuilder internal constructor(
) )
} }
/**
* Create a new [RawResourcePatch].
*
* @param name The name of the patch.
* If null, the patch is named "Patch" and will not be loaded by [PatchLoader].
* @param description The description of the patch.
* @param use Weather or not the patch should be used.
* @param block The block to build the patch.
* @return The created [RawResourcePatch].
*/
fun rawResourcePatch(
name: String? = null,
description: String? = null,
use: Boolean = true,
block: RawResourcePatchBuilder.() -> Unit = {},
) = RawResourcePatchBuilder(name, description, use).buildPatch(block) as RawResourcePatch
/** /**
* A [ResourcePatch] builder. * A [ResourcePatch] builder.
* *
@@ -445,51 +522,6 @@ class ResourcePatchBuilder internal constructor(
) )
} }
/**
* Builds a [Patch].
*
* @param B The [PatchBuilder] to build the patch with.
* @param block The block to build the patch.
*
* @return The built [Patch].
*/
private fun <B : PatchBuilder<*>> B.buildPatch(block: B.() -> Unit = {}) = apply(block).build()
/**
* Create a new [BytecodePatch].
*
* @param name The name of the patch.
* If null, the patch is named "Patch" and will not be loaded by [PatchLoader].
* @param description The description of the patch.
* @param use Weather or not the patch should be used.
* @param block The block to build the patch.
*
* @return The created [BytecodePatch].
*/
fun bytecodePatch(
name: String? = null,
description: String? = null,
use: Boolean = true,
block: BytecodePatchBuilder.() -> Unit = {},
) = BytecodePatchBuilder(name, description, use).buildPatch(block) as BytecodePatch
/**
* Create a new [RawResourcePatch].
*
* @param name The name of the patch.
* If null, the patch is named "Patch" and will not be loaded by [PatchLoader].
* @param description The description of the patch.
* @param use Weather or not the patch should be used.
* @param block The block to build the patch.
* @return The created [RawResourcePatch].
*/
fun rawResourcePatch(
name: String? = null,
description: String? = null,
use: Boolean = true,
block: RawResourcePatchBuilder.() -> Unit = {},
) = RawResourcePatchBuilder(name, description, use).buildPatch(block) as RawResourcePatch
/** /**
* Create a new [ResourcePatch]. * Create a new [ResourcePatch].
* *

View File

@@ -9,21 +9,13 @@ class MutableAnnotation(annotation: Annotation) : BaseAnnotation() {
private val type = annotation.type private val type = annotation.type
private val _elements by lazy { annotation.elements.map { element -> element.toMutable() }.toMutableSet() } private val _elements by lazy { annotation.elements.map { element -> element.toMutable() }.toMutableSet() }
override fun getType(): String { override fun getType(): String = type
return type
}
override fun getElements(): MutableSet<MutableAnnotationElement> { override fun getElements(): MutableSet<MutableAnnotationElement> = _elements
return _elements
}
override fun getVisibility(): Int { override fun getVisibility(): Int = visibility
return visibility
}
companion object { companion object {
fun Annotation.toMutable(): MutableAnnotation { fun Annotation.toMutable(): MutableAnnotation = MutableAnnotation(this)
return MutableAnnotation(this)
}
} }
} }

View File

@@ -18,17 +18,11 @@ class MutableAnnotationElement(annotationElement: AnnotationElement) : BaseAnnot
this.value = value this.value = value
} }
override fun getName(): String { override fun getName(): String = name
return name
}
override fun getValue(): EncodedValue { override fun getValue(): EncodedValue = value
return value
}
companion object { companion object {
fun AnnotationElement.toMutable(): MutableAnnotationElement { fun AnnotationElement.toMutable(): MutableAnnotationElement = MutableAnnotationElement(this)
return MutableAnnotationElement(this)
}
} }
} }

View File

@@ -7,9 +7,10 @@ import com.android.tools.smali.dexlib2.base.reference.BaseTypeReference
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.util.FieldUtil import com.android.tools.smali.dexlib2.util.FieldUtil
import com.android.tools.smali.dexlib2.util.MethodUtil import com.android.tools.smali.dexlib2.util.MethodUtil
import com.google.common.collect.Iterables
class MutableClass(classDef: ClassDef) : ClassDef, BaseTypeReference() { class MutableClass(classDef: ClassDef) :
BaseTypeReference(),
ClassDef {
// Class // Class
private var type = classDef.type private var type = classDef.type
private var sourceFile = classDef.sourceFile private var sourceFile = classDef.sourceFile
@@ -23,13 +24,13 @@ class MutableClass(classDef: ClassDef) : ClassDef, BaseTypeReference() {
// Methods // Methods
private val _methods by lazy { classDef.methods.map { method -> method.toMutable() }.toMutableSet() } private val _methods by lazy { classDef.methods.map { method -> method.toMutable() }.toMutableSet() }
private val _directMethods by lazy { Iterables.filter(_methods, MethodUtil.METHOD_IS_DIRECT).toMutableSet() } private val _directMethods by lazy { _methods.filter { method -> MethodUtil.isDirect(method) }.toMutableSet() }
private val _virtualMethods by lazy { Iterables.filter(_methods, MethodUtil.METHOD_IS_VIRTUAL).toMutableSet() } private val _virtualMethods by lazy { _methods.filter { method -> !MethodUtil.isDirect(method) }.toMutableSet() }
// Fields // Fields
private val _fields by lazy { classDef.fields.map { field -> field.toMutable() }.toMutableSet() } private val _fields by lazy { classDef.fields.map { field -> field.toMutable() }.toMutableSet() }
private val _staticFields by lazy { Iterables.filter(_fields, FieldUtil.FIELD_IS_STATIC).toMutableSet() } private val _staticFields by lazy { _fields.filter { field -> FieldUtil.isStatic(field) }.toMutableSet() }
private val _instanceFields by lazy { Iterables.filter(_fields, FieldUtil.FIELD_IS_INSTANCE).toMutableSet() } private val _instanceFields by lazy { _fields.filter { field -> !FieldUtil.isStatic(field) }.toMutableSet() }
fun setType(type: String) { fun setType(type: String) {
this.type = type this.type = type
@@ -47,57 +48,31 @@ class MutableClass(classDef: ClassDef) : ClassDef, BaseTypeReference() {
this.superclass = superclass this.superclass = superclass
} }
override fun getType(): String { override fun getType(): String = type
return type
}
override fun getAccessFlags(): Int { override fun getAccessFlags(): Int = accessFlags
return accessFlags
}
override fun getSourceFile(): String? { override fun getSourceFile(): String? = sourceFile
return sourceFile
}
override fun getSuperclass(): String? { override fun getSuperclass(): String? = superclass
return superclass
}
override fun getInterfaces(): MutableList<String> { override fun getInterfaces(): MutableList<String> = _interfaces
return _interfaces
}
override fun getAnnotations(): MutableSet<MutableAnnotation> { override fun getAnnotations(): MutableSet<MutableAnnotation> = _annotations
return _annotations
}
override fun getStaticFields(): MutableSet<MutableField> { override fun getStaticFields(): MutableSet<MutableField> = _staticFields
return _staticFields
}
override fun getInstanceFields(): MutableSet<MutableField> { override fun getInstanceFields(): MutableSet<MutableField> = _instanceFields
return _instanceFields
}
override fun getFields(): MutableSet<MutableField> { override fun getFields(): MutableSet<MutableField> = _fields
return _fields
}
override fun getDirectMethods(): MutableSet<MutableMethod> { override fun getDirectMethods(): MutableSet<MutableMethod> = _directMethods
return _directMethods
}
override fun getVirtualMethods(): MutableSet<MutableMethod> { override fun getVirtualMethods(): MutableSet<MutableMethod> = _virtualMethods
return _virtualMethods
}
override fun getMethods(): MutableSet<MutableMethod> { override fun getMethods(): MutableSet<MutableMethod> = _methods
return _methods
}
companion object { companion object {
fun ClassDef.toMutable(): MutableClass { fun ClassDef.toMutable(): MutableClass = MutableClass(this)
return MutableClass(this)
}
} }
} }

View File

@@ -7,7 +7,9 @@ import com.android.tools.smali.dexlib2.HiddenApiRestriction
import com.android.tools.smali.dexlib2.base.reference.BaseFieldReference import com.android.tools.smali.dexlib2.base.reference.BaseFieldReference
import com.android.tools.smali.dexlib2.iface.Field import com.android.tools.smali.dexlib2.iface.Field
class MutableField(field: Field) : Field, BaseFieldReference() { class MutableField(field: Field) :
BaseFieldReference(),
Field {
private var definingClass = field.definingClass private var definingClass = field.definingClass
private var name = field.name private var name = field.name
private var type = field.type private var type = field.type
@@ -37,37 +39,21 @@ class MutableField(field: Field) : Field, BaseFieldReference() {
this.initialValue = initialValue this.initialValue = initialValue
} }
override fun getDefiningClass(): String { override fun getDefiningClass(): String = this.definingClass
return this.definingClass
}
override fun getName(): String { override fun getName(): String = this.name
return this.name
}
override fun getType(): String { override fun getType(): String = this.type
return this.type
}
override fun getAnnotations(): MutableSet<MutableAnnotation> { override fun getAnnotations(): MutableSet<MutableAnnotation> = this._annotations
return this._annotations
}
override fun getAccessFlags(): Int { override fun getAccessFlags(): Int = this.accessFlags
return this.accessFlags
}
override fun getHiddenApiRestrictions(): MutableSet<HiddenApiRestriction> { override fun getHiddenApiRestrictions(): MutableSet<HiddenApiRestriction> = this._hiddenApiRestrictions
return this._hiddenApiRestrictions
}
override fun getInitialValue(): MutableEncodedValue? { override fun getInitialValue(): MutableEncodedValue? = this.initialValue
return this.initialValue
}
companion object { companion object {
fun Field.toMutable(): MutableField { fun Field.toMutable(): MutableField = MutableField(this)
return MutableField(this)
}
} }
} }

View File

@@ -7,7 +7,9 @@ import com.android.tools.smali.dexlib2.base.reference.BaseMethodReference
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
class MutableMethod(method: Method) : Method, BaseMethodReference() { class MutableMethod(method: Method) :
BaseMethodReference(),
Method {
private var definingClass = method.definingClass private var definingClass = method.definingClass
private var name = method.name private var name = method.name
private var accessFlags = method.accessFlags private var accessFlags = method.accessFlags
@@ -36,45 +38,25 @@ class MutableMethod(method: Method) : Method, BaseMethodReference() {
this.returnType = returnType this.returnType = returnType
} }
override fun getDefiningClass(): String { override fun getDefiningClass(): String = definingClass
return definingClass
}
override fun getName(): String { override fun getName(): String = name
return name
}
override fun getParameterTypes(): MutableList<CharSequence> { override fun getParameterTypes(): MutableList<CharSequence> = _parameterTypes
return _parameterTypes
}
override fun getReturnType(): String { override fun getReturnType(): String = returnType
return returnType
}
override fun getAnnotations(): MutableSet<MutableAnnotation> { override fun getAnnotations(): MutableSet<MutableAnnotation> = _annotations
return _annotations
}
override fun getAccessFlags(): Int { override fun getAccessFlags(): Int = accessFlags
return accessFlags
}
override fun getHiddenApiRestrictions(): MutableSet<HiddenApiRestriction> { override fun getHiddenApiRestrictions(): MutableSet<HiddenApiRestriction> = _hiddenApiRestrictions
return _hiddenApiRestrictions
}
override fun getParameters(): MutableList<MutableMethodParameter> { override fun getParameters(): MutableList<MutableMethodParameter> = _parameters
return _parameters
}
override fun getImplementation(): MutableMethodImplementation? { override fun getImplementation(): MutableMethodImplementation? = _implementation
return _implementation
}
companion object { companion object {
fun Method.toMutable(): MutableMethod { fun Method.toMutable(): MutableMethod = MutableMethod(this)
return MutableMethod(this)
}
} }
} }

View File

@@ -5,7 +5,9 @@ import com.android.tools.smali.dexlib2.base.BaseMethodParameter
import com.android.tools.smali.dexlib2.iface.MethodParameter import com.android.tools.smali.dexlib2.iface.MethodParameter
// TODO: finish overriding all members if necessary // TODO: finish overriding all members if necessary
class MutableMethodParameter(parameter: MethodParameter) : MethodParameter, BaseMethodParameter() { class MutableMethodParameter(parameter: MethodParameter) :
BaseMethodParameter(),
MethodParameter {
private var type = parameter.type private var type = parameter.type
private var name = parameter.name private var name = parameter.name
private var signature = parameter.signature private var signature = parameter.signature
@@ -13,25 +15,15 @@ class MutableMethodParameter(parameter: MethodParameter) : MethodParameter, Base
parameter.annotations.map { annotation -> annotation.toMutable() }.toMutableSet() parameter.annotations.map { annotation -> annotation.toMutable() }.toMutableSet()
} }
override fun getType(): String { override fun getType(): String = type
return type
}
override fun getName(): String? { override fun getName(): String? = name
return name
}
override fun getSignature(): String? { override fun getSignature(): String? = signature
return signature
}
override fun getAnnotations(): MutableSet<MutableAnnotation> { override fun getAnnotations(): MutableSet<MutableAnnotation> = _annotations
return _annotations
}
companion object { companion object {
fun MethodParameter.toMutable(): MutableMethodParameter { fun MethodParameter.toMutable(): MutableMethodParameter = MutableMethodParameter(this)
return MutableMethodParameter(this)
}
} }
} }

View File

@@ -14,21 +14,15 @@ class MutableAnnotationEncodedValue(annotationEncodedValue: AnnotationEncodedVal
annotationEncodedValue.elements.map { annotationElement -> annotationElement.toMutable() }.toMutableSet() annotationEncodedValue.elements.map { annotationElement -> annotationElement.toMutable() }.toMutableSet()
} }
override fun getType(): String { override fun getType(): String = this.type
return this.type
}
fun setType(type: String) { fun setType(type: String) {
this.type = type this.type = type
} }
override fun getElements(): MutableSet<out AnnotationElement> { override fun getElements(): MutableSet<out AnnotationElement> = _elements
return _elements
}
companion object { companion object {
fun AnnotationEncodedValue.toMutable(): MutableAnnotationEncodedValue { fun AnnotationEncodedValue.toMutable(): MutableAnnotationEncodedValue = MutableAnnotationEncodedValue(this)
return MutableAnnotationEncodedValue(this)
}
} }
} }

View File

@@ -5,18 +5,16 @@ import com.android.tools.smali.dexlib2.base.value.BaseArrayEncodedValue
import com.android.tools.smali.dexlib2.iface.value.ArrayEncodedValue import com.android.tools.smali.dexlib2.iface.value.ArrayEncodedValue
import com.android.tools.smali.dexlib2.iface.value.EncodedValue import com.android.tools.smali.dexlib2.iface.value.EncodedValue
class MutableArrayEncodedValue(arrayEncodedValue: ArrayEncodedValue) : BaseArrayEncodedValue(), MutableEncodedValue { class MutableArrayEncodedValue(arrayEncodedValue: ArrayEncodedValue) :
BaseArrayEncodedValue(),
MutableEncodedValue {
private val _value by lazy { private val _value by lazy {
arrayEncodedValue.value.map { encodedValue -> encodedValue.toMutable() }.toMutableList() arrayEncodedValue.value.map { encodedValue -> encodedValue.toMutable() }.toMutableList()
} }
override fun getValue(): MutableList<out EncodedValue> { override fun getValue(): MutableList<out EncodedValue> = _value
return _value
}
companion object { companion object {
fun ArrayEncodedValue.toMutable(): MutableArrayEncodedValue { fun ArrayEncodedValue.toMutable(): MutableArrayEncodedValue = MutableArrayEncodedValue(this)
return MutableArrayEncodedValue(this)
}
} }
} }

View File

@@ -8,17 +8,13 @@ class MutableBooleanEncodedValue(booleanEncodedValue: BooleanEncodedValue) :
MutableEncodedValue { MutableEncodedValue {
private var value = booleanEncodedValue.value private var value = booleanEncodedValue.value
override fun getValue(): Boolean { override fun getValue(): Boolean = this.value
return this.value
}
fun setValue(value: Boolean) { fun setValue(value: Boolean) {
this.value = value this.value = value
} }
companion object { companion object {
fun BooleanEncodedValue.toMutable(): MutableBooleanEncodedValue { fun BooleanEncodedValue.toMutable(): MutableBooleanEncodedValue = MutableBooleanEncodedValue(this)
return MutableBooleanEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseByteEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseByteEncodedValue
import com.android.tools.smali.dexlib2.iface.value.ByteEncodedValue import com.android.tools.smali.dexlib2.iface.value.ByteEncodedValue
class MutableByteEncodedValue(byteEncodedValue: ByteEncodedValue) : BaseByteEncodedValue(), MutableEncodedValue { class MutableByteEncodedValue(byteEncodedValue: ByteEncodedValue) :
BaseByteEncodedValue(),
MutableEncodedValue {
private var value = byteEncodedValue.value private var value = byteEncodedValue.value
override fun getValue(): Byte { override fun getValue(): Byte = this.value
return this.value
}
fun setValue(value: Byte) { fun setValue(value: Byte) {
this.value = value this.value = value
} }
companion object { companion object {
fun ByteEncodedValue.toMutable(): MutableByteEncodedValue { fun ByteEncodedValue.toMutable(): MutableByteEncodedValue = MutableByteEncodedValue(this)
return MutableByteEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseCharEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseCharEncodedValue
import com.android.tools.smali.dexlib2.iface.value.CharEncodedValue import com.android.tools.smali.dexlib2.iface.value.CharEncodedValue
class MutableCharEncodedValue(charEncodedValue: CharEncodedValue) : BaseCharEncodedValue(), MutableEncodedValue { class MutableCharEncodedValue(charEncodedValue: CharEncodedValue) :
BaseCharEncodedValue(),
MutableEncodedValue {
private var value = charEncodedValue.value private var value = charEncodedValue.value
override fun getValue(): Char { override fun getValue(): Char = this.value
return this.value
}
fun setValue(value: Char) { fun setValue(value: Char) {
this.value = value this.value = value
} }
companion object { companion object {
fun CharEncodedValue.toMutable(): MutableCharEncodedValue { fun CharEncodedValue.toMutable(): MutableCharEncodedValue = MutableCharEncodedValue(this)
return MutableCharEncodedValue(this)
}
} }
} }

View File

@@ -8,17 +8,13 @@ class MutableDoubleEncodedValue(doubleEncodedValue: DoubleEncodedValue) :
MutableEncodedValue { MutableEncodedValue {
private var value = doubleEncodedValue.value private var value = doubleEncodedValue.value
override fun getValue(): Double { override fun getValue(): Double = this.value
return this.value
}
fun setValue(value: Double) { fun setValue(value: Double) {
this.value = value this.value = value
} }
companion object { companion object {
fun DoubleEncodedValue.toMutable(): MutableDoubleEncodedValue { fun DoubleEncodedValue.toMutable(): MutableDoubleEncodedValue = MutableDoubleEncodedValue(this)
return MutableDoubleEncodedValue(this)
}
} }
} }

View File

@@ -4,20 +4,18 @@ import com.android.tools.smali.dexlib2.base.value.BaseEnumEncodedValue
import com.android.tools.smali.dexlib2.iface.reference.FieldReference import com.android.tools.smali.dexlib2.iface.reference.FieldReference
import com.android.tools.smali.dexlib2.iface.value.EnumEncodedValue import com.android.tools.smali.dexlib2.iface.value.EnumEncodedValue
class MutableEnumEncodedValue(enumEncodedValue: EnumEncodedValue) : BaseEnumEncodedValue(), MutableEncodedValue { class MutableEnumEncodedValue(enumEncodedValue: EnumEncodedValue) :
BaseEnumEncodedValue(),
MutableEncodedValue {
private var value = enumEncodedValue.value private var value = enumEncodedValue.value
override fun getValue(): FieldReference { override fun getValue(): FieldReference = this.value
return this.value
}
fun setValue(value: FieldReference) { fun setValue(value: FieldReference) {
this.value = value this.value = value
} }
companion object { companion object {
fun EnumEncodedValue.toMutable(): MutableEnumEncodedValue { fun EnumEncodedValue.toMutable(): MutableEnumEncodedValue = MutableEnumEncodedValue(this)
return MutableEnumEncodedValue(this)
}
} }
} }

View File

@@ -5,24 +5,20 @@ import com.android.tools.smali.dexlib2.base.value.BaseFieldEncodedValue
import com.android.tools.smali.dexlib2.iface.reference.FieldReference import com.android.tools.smali.dexlib2.iface.reference.FieldReference
import com.android.tools.smali.dexlib2.iface.value.FieldEncodedValue import com.android.tools.smali.dexlib2.iface.value.FieldEncodedValue
class MutableFieldEncodedValue(fieldEncodedValue: FieldEncodedValue) : BaseFieldEncodedValue(), MutableEncodedValue { class MutableFieldEncodedValue(fieldEncodedValue: FieldEncodedValue) :
BaseFieldEncodedValue(),
MutableEncodedValue {
private var value = fieldEncodedValue.value private var value = fieldEncodedValue.value
override fun getValueType(): Int { override fun getValueType(): Int = ValueType.FIELD
return ValueType.FIELD
}
override fun getValue(): FieldReference { override fun getValue(): FieldReference = this.value
return this.value
}
fun setValue(value: FieldReference) { fun setValue(value: FieldReference) {
this.value = value this.value = value
} }
companion object { companion object {
fun FieldEncodedValue.toMutable(): MutableFieldEncodedValue { fun FieldEncodedValue.toMutable(): MutableFieldEncodedValue = MutableFieldEncodedValue(this)
return MutableFieldEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseFloatEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseFloatEncodedValue
import com.android.tools.smali.dexlib2.iface.value.FloatEncodedValue import com.android.tools.smali.dexlib2.iface.value.FloatEncodedValue
class MutableFloatEncodedValue(floatEncodedValue: FloatEncodedValue) : BaseFloatEncodedValue(), MutableEncodedValue { class MutableFloatEncodedValue(floatEncodedValue: FloatEncodedValue) :
BaseFloatEncodedValue(),
MutableEncodedValue {
private var value = floatEncodedValue.value private var value = floatEncodedValue.value
override fun getValue(): Float { override fun getValue(): Float = this.value
return this.value
}
fun setValue(value: Float) { fun setValue(value: Float) {
this.value = value this.value = value
} }
companion object { companion object {
fun FloatEncodedValue.toMutable(): MutableFloatEncodedValue { fun FloatEncodedValue.toMutable(): MutableFloatEncodedValue = MutableFloatEncodedValue(this)
return MutableFloatEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseIntEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseIntEncodedValue
import com.android.tools.smali.dexlib2.iface.value.IntEncodedValue import com.android.tools.smali.dexlib2.iface.value.IntEncodedValue
class MutableIntEncodedValue(intEncodedValue: IntEncodedValue) : BaseIntEncodedValue(), MutableEncodedValue { class MutableIntEncodedValue(intEncodedValue: IntEncodedValue) :
BaseIntEncodedValue(),
MutableEncodedValue {
private var value = intEncodedValue.value private var value = intEncodedValue.value
override fun getValue(): Int { override fun getValue(): Int = this.value
return this.value
}
fun setValue(value: Int) { fun setValue(value: Int) {
this.value = value this.value = value
} }
companion object { companion object {
fun IntEncodedValue.toMutable(): MutableIntEncodedValue { fun IntEncodedValue.toMutable(): MutableIntEncodedValue = MutableIntEncodedValue(this)
return MutableIntEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseLongEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseLongEncodedValue
import com.android.tools.smali.dexlib2.iface.value.LongEncodedValue import com.android.tools.smali.dexlib2.iface.value.LongEncodedValue
class MutableLongEncodedValue(longEncodedValue: LongEncodedValue) : BaseLongEncodedValue(), MutableEncodedValue { class MutableLongEncodedValue(longEncodedValue: LongEncodedValue) :
BaseLongEncodedValue(),
MutableEncodedValue {
private var value = longEncodedValue.value private var value = longEncodedValue.value
override fun getValue(): Long { override fun getValue(): Long = this.value
return this.value
}
fun setValue(value: Long) { fun setValue(value: Long) {
this.value = value this.value = value
} }
companion object { companion object {
fun LongEncodedValue.toMutable(): MutableLongEncodedValue { fun LongEncodedValue.toMutable(): MutableLongEncodedValue = MutableLongEncodedValue(this)
return MutableLongEncodedValue(this)
}
} }
} }

View File

@@ -9,17 +9,13 @@ class MutableMethodEncodedValue(methodEncodedValue: MethodEncodedValue) :
MutableEncodedValue { MutableEncodedValue {
private var value = methodEncodedValue.value private var value = methodEncodedValue.value
override fun getValue(): MethodReference { override fun getValue(): MethodReference = this.value
return this.value
}
fun setValue(value: MethodReference) { fun setValue(value: MethodReference) {
this.value = value this.value = value
} }
companion object { companion object {
fun MethodEncodedValue.toMutable(): MutableMethodEncodedValue { fun MethodEncodedValue.toMutable(): MutableMethodEncodedValue = MutableMethodEncodedValue(this)
return MutableMethodEncodedValue(this)
}
} }
} }

View File

@@ -9,17 +9,13 @@ class MutableMethodHandleEncodedValue(methodHandleEncodedValue: MethodHandleEnco
MutableEncodedValue { MutableEncodedValue {
private var value = methodHandleEncodedValue.value private var value = methodHandleEncodedValue.value
override fun getValue(): MethodHandleReference { override fun getValue(): MethodHandleReference = this.value
return this.value
}
fun setValue(value: MethodHandleReference) { fun setValue(value: MethodHandleReference) {
this.value = value this.value = value
} }
companion object { companion object {
fun MethodHandleEncodedValue.toMutable(): MutableMethodHandleEncodedValue { fun MethodHandleEncodedValue.toMutable(): MutableMethodHandleEncodedValue = MutableMethodHandleEncodedValue(this)
return MutableMethodHandleEncodedValue(this)
}
} }
} }

View File

@@ -9,17 +9,13 @@ class MutableMethodTypeEncodedValue(methodTypeEncodedValue: MethodTypeEncodedVal
MutableEncodedValue { MutableEncodedValue {
private var value = methodTypeEncodedValue.value private var value = methodTypeEncodedValue.value
override fun getValue(): MethodProtoReference { override fun getValue(): MethodProtoReference = this.value
return this.value
}
fun setValue(value: MethodProtoReference) { fun setValue(value: MethodProtoReference) {
this.value = value this.value = value
} }
companion object { companion object {
fun MethodTypeEncodedValue.toMutable(): MutableMethodTypeEncodedValue { fun MethodTypeEncodedValue.toMutable(): MutableMethodTypeEncodedValue = MutableMethodTypeEncodedValue(this)
return MutableMethodTypeEncodedValue(this)
}
} }
} }

View File

@@ -3,10 +3,10 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseNullEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseNullEncodedValue
import com.android.tools.smali.dexlib2.iface.value.ByteEncodedValue import com.android.tools.smali.dexlib2.iface.value.ByteEncodedValue
class MutableNullEncodedValue : BaseNullEncodedValue(), MutableEncodedValue { class MutableNullEncodedValue :
BaseNullEncodedValue(),
MutableEncodedValue {
companion object { companion object {
fun ByteEncodedValue.toMutable(): MutableByteEncodedValue { fun ByteEncodedValue.toMutable(): MutableByteEncodedValue = MutableByteEncodedValue(this)
return MutableByteEncodedValue(this)
}
} }
} }

View File

@@ -3,20 +3,18 @@ package app.revanced.patcher.util.proxy.mutableTypes.encodedValue
import com.android.tools.smali.dexlib2.base.value.BaseShortEncodedValue import com.android.tools.smali.dexlib2.base.value.BaseShortEncodedValue
import com.android.tools.smali.dexlib2.iface.value.ShortEncodedValue import com.android.tools.smali.dexlib2.iface.value.ShortEncodedValue
class MutableShortEncodedValue(shortEncodedValue: ShortEncodedValue) : BaseShortEncodedValue(), MutableEncodedValue { class MutableShortEncodedValue(shortEncodedValue: ShortEncodedValue) :
BaseShortEncodedValue(),
MutableEncodedValue {
private var value = shortEncodedValue.value private var value = shortEncodedValue.value
override fun getValue(): Short { override fun getValue(): Short = this.value
return this.value
}
fun setValue(value: Short) { fun setValue(value: Short) {
this.value = value this.value = value
} }
companion object { companion object {
fun ShortEncodedValue.toMutable(): MutableShortEncodedValue { fun ShortEncodedValue.toMutable(): MutableShortEncodedValue = MutableShortEncodedValue(this)
return MutableShortEncodedValue(this)
}
} }
} }

View File

@@ -9,17 +9,13 @@ class MutableStringEncodedValue(stringEncodedValue: StringEncodedValue) :
MutableEncodedValue { MutableEncodedValue {
private var value = stringEncodedValue.value private var value = stringEncodedValue.value
override fun getValue(): String { override fun getValue(): String = this.value
return this.value
}
fun setValue(value: String) { fun setValue(value: String) {
this.value = value this.value = value
} }
companion object { companion object {
fun ByteEncodedValue.toMutable(): MutableByteEncodedValue { fun ByteEncodedValue.toMutable(): MutableByteEncodedValue = MutableByteEncodedValue(this)
return MutableByteEncodedValue(this)
}
} }
} }

Some files were not shown because too many files have changed in this diff Show More