From 12293bb3b1bb954c861db0ffcac9cdd21c23cc9b Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 3 Aug 2019 11:32:14 +0100 Subject: [PATCH] Refactor package structure of the asm module --- asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java | 1 - .../main/java/dev/openrs2/asm/{ => classpath}/Library.java | 2 +- .../java/dev/openrs2/asm/{ => transform}/Transformer.java | 2 +- deob/src/main/java/dev/openrs2/deob/Deobfuscator.java | 4 ++-- deob/src/main/java/dev/openrs2/deob/SignedClassSet.java | 2 +- .../main/java/dev/openrs2/deob/remap/ClassNamePrefixer.java | 2 +- .../java/dev/openrs2/deob/transform/BitShiftTransformer.java | 2 +- .../java/dev/openrs2/deob/transform/CanvasTransformer.java | 2 +- .../dev/openrs2/deob/transform/ClassForNameTransformer.java | 2 +- .../java/dev/openrs2/deob/transform/CounterTransformer.java | 2 +- .../openrs2/deob/transform/ExceptionTracingTransformer.java | 2 +- .../dev/openrs2/deob/transform/FieldOrderTransformer.java | 2 +- .../openrs2/deob/transform/OpaquePredicateTransformer.java | 4 ++-- .../dev/openrs2/deob/transform/OriginalNameTransformer.java | 2 +- 14 files changed, 15 insertions(+), 16 deletions(-) rename asm/src/main/java/dev/openrs2/asm/{ => classpath}/Library.java (99%) rename asm/src/main/java/dev/openrs2/asm/{ => transform}/Transformer.java (97%) diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java index 0d4af6625a..41fd7ca903 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java @@ -8,7 +8,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import dev.openrs2.asm.Library; import dev.openrs2.asm.MemberDesc; import dev.openrs2.asm.MemberRef; import dev.openrs2.util.collect.DisjointSet; diff --git a/asm/src/main/java/dev/openrs2/asm/Library.java b/asm/src/main/java/dev/openrs2/asm/classpath/Library.java similarity index 99% rename from asm/src/main/java/dev/openrs2/asm/Library.java rename to asm/src/main/java/dev/openrs2/asm/classpath/Library.java index 9477e01552..9ad95bbda6 100644 --- a/asm/src/main/java/dev/openrs2/asm/Library.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/Library.java @@ -1,4 +1,4 @@ -package dev.openrs2.asm; +package dev.openrs2.asm.classpath; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/asm/src/main/java/dev/openrs2/asm/Transformer.java b/asm/src/main/java/dev/openrs2/asm/transform/Transformer.java similarity index 97% rename from asm/src/main/java/dev/openrs2/asm/Transformer.java rename to asm/src/main/java/dev/openrs2/asm/transform/Transformer.java index 4a8909e55a..1dc99b9c52 100644 --- a/asm/src/main/java/dev/openrs2/asm/Transformer.java +++ b/asm/src/main/java/dev/openrs2/asm/transform/Transformer.java @@ -1,4 +1,4 @@ -package dev.openrs2.asm; +package dev.openrs2.asm.transform; import dev.openrs2.asm.classpath.ClassPath; import org.objectweb.asm.Opcodes; diff --git a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java index 89bb391d27..b7b726344f 100644 --- a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java +++ b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java @@ -6,9 +6,9 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; -import dev.openrs2.asm.Library; -import dev.openrs2.asm.Transformer; import dev.openrs2.asm.classpath.ClassPath; +import dev.openrs2.asm.classpath.Library; +import dev.openrs2.asm.transform.Transformer; import dev.openrs2.deob.remap.ClassNamePrefixer; import dev.openrs2.deob.remap.TypedRemapper; import dev.openrs2.deob.transform.BitShiftTransformer; diff --git a/deob/src/main/java/dev/openrs2/deob/SignedClassSet.java b/deob/src/main/java/dev/openrs2/deob/SignedClassSet.java index 0e2ef63534..e3312dc9e9 100644 --- a/deob/src/main/java/dev/openrs2/deob/SignedClassSet.java +++ b/deob/src/main/java/dev/openrs2/deob/SignedClassSet.java @@ -6,7 +6,7 @@ import java.util.Set; import com.google.common.collect.Sets; import dev.openrs2.asm.InsnMatcher; -import dev.openrs2.asm.Library; +import dev.openrs2.asm.classpath.Library; import org.objectweb.asm.Type; import org.objectweb.asm.commons.ClassRemapper; import org.objectweb.asm.commons.SimpleRemapper; diff --git a/deob/src/main/java/dev/openrs2/deob/remap/ClassNamePrefixer.java b/deob/src/main/java/dev/openrs2/deob/remap/ClassNamePrefixer.java index 5d6f4d436e..6076c25423 100644 --- a/deob/src/main/java/dev/openrs2/deob/remap/ClassNamePrefixer.java +++ b/deob/src/main/java/dev/openrs2/deob/remap/ClassNamePrefixer.java @@ -2,7 +2,7 @@ package dev.openrs2.deob.remap; import java.util.HashMap; -import dev.openrs2.asm.Library; +import dev.openrs2.asm.classpath.Library; import dev.openrs2.deob.transform.ClassForNameTransformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.commons.ClassRemapper; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.java index ce0364dcc1..b96bfe917a 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/BitShiftTransformer.java @@ -4,8 +4,8 @@ import java.util.Set; import dev.openrs2.asm.InsnMatcher; import dev.openrs2.asm.InsnNodeUtils; -import dev.openrs2.asm.Transformer; import dev.openrs2.asm.classpath.ClassPath; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.MethodNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java index d1c62cb583..9bc73d3e69 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java @@ -1,6 +1,6 @@ package dev.openrs2.deob.transform; -import dev.openrs2.asm.Transformer; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.ClassNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ClassForNameTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/ClassForNameTransformer.java index 9388bdb468..43a591f975 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ClassForNameTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/ClassForNameTransformer.java @@ -3,7 +3,7 @@ package dev.openrs2.deob.transform; import java.util.List; import dev.openrs2.asm.InsnMatcher; -import dev.openrs2.asm.Transformer; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.commons.Remapper; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.java index d03546b8eb..4e1ccc2053 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/CounterTransformer.java @@ -7,8 +7,8 @@ import java.util.Set; import dev.openrs2.asm.InsnMatcher; import dev.openrs2.asm.MemberRef; -import dev.openrs2.asm.Transformer; import dev.openrs2.asm.classpath.ClassPath; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.java index b265c0eb50..0224a07623 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/ExceptionTracingTransformer.java @@ -2,8 +2,8 @@ package dev.openrs2.deob.transform; import dev.openrs2.asm.InsnMatcher; import dev.openrs2.asm.InsnNodeUtils; -import dev.openrs2.asm.Transformer; import dev.openrs2.asm.classpath.ClassPath; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.MethodNode; import org.slf4j.Logger; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.java index a11e0acf10..68cbc1d5ea 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/FieldOrderTransformer.java @@ -3,7 +3,7 @@ package dev.openrs2.deob.transform; import java.util.HashMap; import dev.openrs2.asm.MemberDesc; -import dev.openrs2.asm.Transformer; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldInsnNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/OpaquePredicateTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/OpaquePredicateTransformer.java index ee293d98e1..8bb1a72a53 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/OpaquePredicateTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/OpaquePredicateTransformer.java @@ -5,10 +5,10 @@ import java.util.List; import java.util.Set; import dev.openrs2.asm.InsnMatcher; -import dev.openrs2.asm.Library; import dev.openrs2.asm.MemberRef; -import dev.openrs2.asm.Transformer; import dev.openrs2.asm.classpath.ClassPath; +import dev.openrs2.asm.classpath.Library; +import dev.openrs2.asm.transform.Transformer; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.java index b976e85aea..3dbb213d12 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.java @@ -3,7 +3,7 @@ package dev.openrs2.deob.transform; import java.util.ArrayList; import java.util.List; -import dev.openrs2.asm.Transformer; +import dev.openrs2.asm.transform.Transformer; import dev.openrs2.deob.annotation.OriginalArg; import dev.openrs2.deob.annotation.OriginalClass; import dev.openrs2.deob.annotation.OriginalMember;