feat: Closeable patches

This commit is contained in:
oSumAtrIX
2022-08-01 04:12:33 +02:00
parent 3de999a2d3
commit bbd40bf2f6
2 changed files with 36 additions and 15 deletions

View File

@@ -3,14 +3,16 @@ package app.revanced.patcher.patch
import app.revanced.patcher.data.Data
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.patch.impl.ResourcePatch
import java.io.Closeable
/**
* A ReVanced patch.
*
* Can either be a [ResourcePatch] or a [BytecodePatch].
* If it implements [Closeable], it will be closed after all patches have been executed.
* Closing will be done in reverse execution order.
*/
abstract class Patch<out T : Data> {
/**
* The main function of the [Patch] which the patcher will call.
*/