From 1833221bc88674701c0926c159b04c4d78c5a012 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 6 Aug 2020 10:01:59 +0100 Subject: [PATCH] Fix naming of Module constants Signed-off-by: Graham --- .../dev/openrs2/decompiler/DecompileCommand.kt | 2 +- .../dev/openrs2/deob/ast/DeobfuscateAstCommand.kt | 2 +- .../src/main/java/dev/openrs2/deob/util/Module.kt | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt index 7bc183f6..e4254768 100644 --- a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt +++ b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt @@ -7,7 +7,7 @@ fun main(args: Array) = DecompileCommand().main(args) class DecompileCommand : CliktCommand(name = "decompile") { override fun run() { - val decompiler = Decompiler(Module.all) + val decompiler = Decompiler(Module.ALL) decompiler.run() } } diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/DeobfuscateAstCommand.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/DeobfuscateAstCommand.kt index 6a6d9ef5..209774d6 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/DeobfuscateAstCommand.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/DeobfuscateAstCommand.kt @@ -10,6 +10,6 @@ class DeobfuscateAstCommand : CliktCommand(name = "deob-ast") { override fun run() { val injector = Guice.createInjector(AstDeobfuscatorModule) val deobfuscator = injector.getInstance(AstDeobfuscator::class.java) - deobfuscator.run(Module.all) + deobfuscator.run(Module.ALL) } } diff --git a/deob-util/src/main/java/dev/openrs2/deob/util/Module.kt b/deob-util/src/main/java/dev/openrs2/deob/util/Module.kt index 62a18b1f..eea088ce 100644 --- a/deob-util/src/main/java/dev/openrs2/deob/util/Module.kt +++ b/deob-util/src/main/java/dev/openrs2/deob/util/Module.kt @@ -9,13 +9,13 @@ class Module(val name: String, val dependencies: Set = emptySet()) { val transitiveDependencies: Set = dependencies.plus(dependencies.flatMap { it.transitiveDependencies }) companion object { - private val gl = Module("gl") - private val signLink = Module("signlink") - private val unpack = Module("unpack") - private val client = Module("client", setOf(gl, signLink)) - private val loader = Module("loader", setOf(signLink, unpack)) - private val unpackClass = Module("unpackclass", setOf(unpack)) + private val GL = Module("gl") + private val SIGNLINK = Module("signlink") + private val UNPACK = Module("unpack") + private val CLIENT = Module("client", setOf(GL, SIGNLINK)) + private val LOADER = Module("loader", setOf(SIGNLINK, UNPACK)) + private val UNPACKCLASS = Module("unpackclass", setOf(UNPACK)) - val all = setOf(client, gl, loader, signLink, unpack, unpackClass) + val ALL = setOf(CLIENT, GL, LOADER, SIGNLINK, UNPACK, UNPACKCLASS) } }