From 0b1d46eec4714bedc05ad08dfa421876de7e6186 Mon Sep 17 00:00:00 2001 From: Graham Date: Mon, 12 Aug 2019 18:50:47 +0100 Subject: [PATCH] Rename AddSubTransformer to NegativeLiteralTransformer --- .../src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.java | 4 ++-- ...AddSubTransformer.java => NegativeLiteralTransformer.java} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename deob-ast/src/main/java/dev/openrs2/deob/ast/transform/{AddSubTransformer.java => NegativeLiteralTransformer.java} (93%) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.java b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.java index 0c9c38a9..7a87bdd5 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.java +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.java @@ -12,15 +12,15 @@ import com.github.javaparser.symbolsolver.resolution.typesolvers.JavaParserTypeS import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; import com.github.javaparser.utils.SourceRoot; import com.google.common.collect.ImmutableList; -import dev.openrs2.deob.ast.transform.AddSubTransformer; import dev.openrs2.deob.ast.transform.BinaryExprOrderTransformer; import dev.openrs2.deob.ast.transform.ComplementTransformer; import dev.openrs2.deob.ast.transform.IfElseTransformer; +import dev.openrs2.deob.ast.transform.NegativeLiteralTransformer; import dev.openrs2.deob.ast.transform.Transformer; public final class AstDeobfuscator { private static final ImmutableList TRANSFORMERS = ImmutableList.of( - new AddSubTransformer(), + new NegativeLiteralTransformer(), new ComplementTransformer(), new IfElseTransformer(), new BinaryExprOrderTransformer() diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.java b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/NegativeLiteralTransformer.java similarity index 93% rename from deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.java rename to deob-ast/src/main/java/dev/openrs2/deob/ast/transform/NegativeLiteralTransformer.java index 09c80429..0a0a12e4 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/AddSubTransformer.java +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/NegativeLiteralTransformer.java @@ -6,7 +6,7 @@ import com.github.javaparser.ast.expr.IntegerLiteralExpr; import com.github.javaparser.ast.expr.UnaryExpr; import dev.openrs2.deob.ast.util.ExprUtils; -public final class AddSubTransformer extends Transformer { +public final class NegativeLiteralTransformer extends Transformer { private static Expression negate(Expression expr) { if (expr.isIntegerLiteralExpr()) { return new IntegerLiteralExpr(-expr.asIntegerLiteralExpr().asInt());