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 <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent 971437e142
commit b6f7576864
  1. 10
      deob-processor/src/main/java/dev/openrs2/deob/processor/DeobfuscatorProcessorModule.kt
  2. 3
      deob-processor/src/main/java/dev/openrs2/deob/processor/NameMapProcessor.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)
}
}

@ -11,7 +11,6 @@ import dev.openrs2.deob.annotation.OriginalMember
import dev.openrs2.deob.map.Field import dev.openrs2.deob.map.Field
import dev.openrs2.deob.map.Method import dev.openrs2.deob.map.Method
import dev.openrs2.deob.map.NameMap import dev.openrs2.deob.map.NameMap
import dev.openrs2.yaml.YamlModule
import java.nio.file.Files import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
@ -46,7 +45,7 @@ class NameMapProcessor : AbstractProcessor() {
private lateinit var localScanner: LocalVariableScanner private lateinit var localScanner: LocalVariableScanner
init { init {
val injector = Guice.createInjector(YamlModule) val injector = Guice.createInjector(DeobfuscatorProcessorModule)
mapper = injector.getInstance(ObjectMapper::class.java) mapper = injector.getInstance(ObjectMapper::class.java)
} }

Loading…
Cancel
Save