From 406feb72f0e07d9534706f32ec1ffa3e5f4e5af5 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 3 Aug 2019 10:52:25 +0100 Subject: [PATCH] Move classpath package to the asm module This is in preparation for Transformers taking an entire ClassPath instead of a single Library at a time, which is in turn required for dummy argument removal (a whole program analysis). --- .../main/java/dev/openrs2/asm}/classpath/AsmClassMetadata.java | 2 +- .../src/main/java/dev/openrs2/asm}/classpath/ClassMetadata.java | 2 +- .../src/main/java/dev/openrs2/asm}/classpath/ClassPath.java | 2 +- .../dev/openrs2/asm}/classpath/ReflectionClassMetadata.java | 2 +- deob/src/main/java/dev/openrs2/deob/Deobfuscator.java | 2 +- .../src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java | 2 ++ 6 files changed, 7 insertions(+), 5 deletions(-) rename {deob/src/main/java/dev/openrs2/deob => asm/src/main/java/dev/openrs2/asm}/classpath/AsmClassMetadata.java (97%) rename {deob/src/main/java/dev/openrs2/deob => asm/src/main/java/dev/openrs2/asm}/classpath/ClassMetadata.java (95%) rename {deob/src/main/java/dev/openrs2/deob => asm/src/main/java/dev/openrs2/asm}/classpath/ClassPath.java (99%) rename {deob/src/main/java/dev/openrs2/deob => asm/src/main/java/dev/openrs2/asm}/classpath/ReflectionClassMetadata.java (98%) diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java b/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.java similarity index 97% rename from deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java rename to asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.java index 27662e715b..b7ba6f8ec0 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/AsmClassMetadata.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/AsmClassMetadata.java @@ -1,4 +1,4 @@ -package dev.openrs2.deob.classpath; +package dev.openrs2.asm.classpath; import java.util.List; import java.util.stream.Collectors; diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java b/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.java similarity index 95% rename from deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java rename to asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.java index b268e2fdb6..2c3fc6f732 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/ClassMetadata.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassMetadata.java @@ -1,4 +1,4 @@ -package dev.openrs2.deob.classpath; +package dev.openrs2.asm.classpath; import java.util.List; import java.util.Objects; diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/ClassPath.java b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java similarity index 99% rename from deob/src/main/java/dev/openrs2/deob/classpath/ClassPath.java rename to asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java index 9de64b2e49..ef0ca450a9 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/ClassPath.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.java @@ -1,4 +1,4 @@ -package dev.openrs2.deob.classpath; +package dev.openrs2.asm.classpath; import java.util.ArrayList; import java.util.Collections; diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java b/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.java similarity index 98% rename from deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java rename to asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.java index 4e45597f84..6b1e027a0c 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/ReflectionClassMetadata.java +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ReflectionClassMetadata.java @@ -1,4 +1,4 @@ -package dev.openrs2.deob.classpath; +package dev.openrs2.asm.classpath; import java.lang.reflect.Modifier; import java.util.Arrays; diff --git a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java index afae732ff3..2b5de72a83 100644 --- a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java +++ b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.java @@ -9,7 +9,7 @@ import java.util.Map; import dev.openrs2.asm.Library; import dev.openrs2.asm.Transformer; -import dev.openrs2.deob.classpath.ClassPath; +import dev.openrs2.asm.classpath.ClassPath; import dev.openrs2.deob.classpath.TypedRemapper; import dev.openrs2.deob.transform.BitShiftTransformer; import dev.openrs2.deob.transform.CanvasTransformer; diff --git a/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java b/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java index 3e421c3ca1..8e891b099e 100644 --- a/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java +++ b/deob/src/main/java/dev/openrs2/deob/classpath/TypedRemapper.java @@ -8,6 +8,8 @@ import java.util.Set; import com.google.common.base.Strings; import dev.openrs2.asm.MemberDesc; import dev.openrs2.asm.MemberRef; +import dev.openrs2.asm.classpath.ClassMetadata; +import dev.openrs2.asm.classpath.ClassPath; import dev.openrs2.util.StringUtils; import dev.openrs2.util.collect.DisjointSet; import org.objectweb.asm.Type;