From 64b8ea5fe7010e7a00bbc82633698751d55cf2c4 Mon Sep 17 00:00:00 2001 From: Graham Date: Mon, 23 Dec 2019 15:24:25 +0000 Subject: [PATCH] Reduce method visibility in Transformers --- .../java/dev/openrs2/deob/transform/BitShiftTransformer.kt | 6 +++--- .../java/dev/openrs2/deob/transform/CanvasTransformer.kt | 2 +- .../openrs2/deob/transform/ExceptionTracingTransformer.kt | 6 +++--- .../dev/openrs2/deob/transform/FieldOrderTransformer.kt | 2 +- .../dev/openrs2/deob/transform/OriginalNameTransformer.kt | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.kt index 1dd91b6950..90df9a74e7 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.kt @@ -13,11 +13,11 @@ import org.objectweb.asm.tree.MethodNode class BitShiftTransformer : Transformer() { private var simplified = 0 - public override fun preTransform(classPath: ClassPath) { + override fun preTransform(classPath: ClassPath) { simplified = 0 } - public override fun transformCode( + override fun transformCode( classPath: ClassPath, library: Library, clazz: ClassNode, @@ -40,7 +40,7 @@ class BitShiftTransformer : Transformer() { return false } - public override fun postTransform(classPath: ClassPath) { + override fun postTransform(classPath: ClassPath) { logger.info { "Simplified $simplified bit shifts" } } diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt index a6e18d5c3a..f47c6c688e 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt @@ -7,7 +7,7 @@ import org.objectweb.asm.Opcodes import org.objectweb.asm.tree.ClassNode class CanvasTransformer : Transformer() { - public override fun transformClass( + override fun transformClass( classPath: ClassPath, library: Library, clazz: ClassNode diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.kt index 55cad9472c..54b51a9494 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.kt @@ -12,11 +12,11 @@ import org.objectweb.asm.tree.MethodNode class ExceptionTracingTransformer : Transformer() { private var tracingTryCatches = 0 - public override fun preTransform(classPath: ClassPath) { + override fun preTransform(classPath: ClassPath) { tracingTryCatches = 0 } - public override fun transformCode( + override fun transformCode( classPath: ClassPath, library: Library, clazz: ClassNode, @@ -35,7 +35,7 @@ class ExceptionTracingTransformer : Transformer() { return false } - public override fun postTransform(classPath: ClassPath) { + override fun postTransform(classPath: ClassPath) { logger.info { "Removed $tracingTryCatches tracing try/catch blocks" } } diff --git a/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.kt index edbb14d4bb..7774531821 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.kt @@ -9,7 +9,7 @@ import org.objectweb.asm.tree.ClassNode import org.objectweb.asm.tree.FieldInsnNode class FieldOrderTransformer : Transformer() { - public override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { + override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { sortFields(clazz, CONSTRUCTOR, Opcodes.PUTFIELD) sortFields(clazz, STATIC_CONSTRUCTOR, Opcodes.PUTSTATIC) return false diff --git a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt index d6c9d0cf0e..63bc502929 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt @@ -13,7 +13,7 @@ import org.objectweb.asm.tree.FieldNode import org.objectweb.asm.tree.MethodNode class OriginalNameTransformer : Transformer() { - public override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { + override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { if (clazz.invisibleAnnotations == null) { clazz.invisibleAnnotations = mutableListOf() } @@ -21,7 +21,7 @@ class OriginalNameTransformer : Transformer() { return false } - public override fun transformField( + override fun transformField( classPath: ClassPath, library: Library, clazz: ClassNode, @@ -34,7 +34,7 @@ class OriginalNameTransformer : Transformer() { return false } - public override fun preTransformMethod( + override fun preTransformMethod( classPath: ClassPath, library: Library, clazz: ClassNode,