From b6f75768648a966c09cd6821bed33cadd6871a1b Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 2 May 2020 23:37:40 +0100 Subject: [PATCH] Add DeobfuscatorProcessorModule Our convention is one Guice module per subproject, where necessary. Although this currently only includes YamlModule, it will include a future DeobfuscatorMapModule. Signed-off-by: Graham --- .../deob/processor/DeobfuscatorProcessorModule.kt | 10 ++++++++++ .../dev/openrs2/deob/processor/NameMapProcessor.kt | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 deob-processor/src/main/java/dev/openrs2/deob/processor/DeobfuscatorProcessorModule.kt diff --git a/deob-processor/src/main/java/dev/openrs2/deob/processor/DeobfuscatorProcessorModule.kt b/deob-processor/src/main/java/dev/openrs2/deob/processor/DeobfuscatorProcessorModule.kt new file mode 100644 index 0000000000..ae12336295 --- /dev/null +++ b/deob-processor/src/main/java/dev/openrs2/deob/processor/DeobfuscatorProcessorModule.kt @@ -0,0 +1,10 @@ +package dev.openrs2.deob.processor + +import com.google.inject.AbstractModule +import dev.openrs2.yaml.YamlModule + +object DeobfuscatorProcessorModule : AbstractModule() { + override fun configure() { + install(YamlModule) + } +} diff --git a/deob-processor/src/main/java/dev/openrs2/deob/processor/NameMapProcessor.kt b/deob-processor/src/main/java/dev/openrs2/deob/processor/NameMapProcessor.kt index 0003d9bdbf..0119417ace 100644 --- a/deob-processor/src/main/java/dev/openrs2/deob/processor/NameMapProcessor.kt +++ b/deob-processor/src/main/java/dev/openrs2/deob/processor/NameMapProcessor.kt @@ -11,7 +11,6 @@ import dev.openrs2.deob.annotation.OriginalMember import dev.openrs2.deob.map.Field import dev.openrs2.deob.map.Method import dev.openrs2.deob.map.NameMap -import dev.openrs2.yaml.YamlModule import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths @@ -46,7 +45,7 @@ class NameMapProcessor : AbstractProcessor() { private lateinit var localScanner: LocalVariableScanner init { - val injector = Guice.createInjector(YamlModule) + val injector = Guice.createInjector(DeobfuscatorProcessorModule) mapper = injector.getInstance(ObjectMapper::class.java) }