forked from openrs2/openrs2
parent
e8ecd5016d
commit
435dee8b6d
@ -0,0 +1,12 @@ |
|||||||
|
package dev.openrs2.deob.map |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.module.SimpleModule |
||||||
|
import dev.openrs2.asm.MemberRef |
||||||
|
import javax.inject.Singleton |
||||||
|
|
||||||
|
@Singleton |
||||||
|
class DeobfuscatorMapJacksonModule : SimpleModule() { |
||||||
|
init { |
||||||
|
addKeyDeserializer(MemberRef::class.java, MemberRefKeyDeserializer) |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package dev.openrs2.deob.map |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.Module |
||||||
|
import com.google.inject.AbstractModule |
||||||
|
import com.google.inject.multibindings.Multibinder |
||||||
|
import dev.openrs2.yaml.YamlModule |
||||||
|
|
||||||
|
object DeobfuscatorMapModule : AbstractModule() { |
||||||
|
override fun configure() { |
||||||
|
install(YamlModule) |
||||||
|
|
||||||
|
Multibinder.newSetBinder(binder(), Module::class.java) |
||||||
|
.addBinding().to(DeobfuscatorMapJacksonModule::class.java) |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
package dev.openrs2.deob.map |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext |
||||||
|
import com.fasterxml.jackson.databind.KeyDeserializer |
||||||
|
import dev.openrs2.asm.MemberRef |
||||||
|
|
||||||
|
object MemberRefKeyDeserializer : KeyDeserializer() { |
||||||
|
override fun deserializeKey(key: String, ctx: DeserializationContext): Any { |
||||||
|
return MemberRef.fromString(key) |
||||||
|
} |
||||||
|
} |
@ -1,10 +1,12 @@ |
|||||||
package dev.openrs2.deob.processor |
package dev.openrs2.deob.processor |
||||||
|
|
||||||
import com.google.inject.AbstractModule |
import com.google.inject.AbstractModule |
||||||
|
import dev.openrs2.deob.map.DeobfuscatorMapModule |
||||||
import dev.openrs2.yaml.YamlModule |
import dev.openrs2.yaml.YamlModule |
||||||
|
|
||||||
object DeobfuscatorProcessorModule : AbstractModule() { |
object DeobfuscatorProcessorModule : AbstractModule() { |
||||||
override fun configure() { |
override fun configure() { |
||||||
|
install(DeobfuscatorMapModule) |
||||||
install(YamlModule) |
install(YamlModule) |
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue