Add missing @Singleton annotations

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 2aee8523c7
commit d9922da1c5
  1. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/CharLiteralTransformer.kt
  2. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/HexLiteralTransformer.kt
  3. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/transform/RedundantCastTransformer.kt
  4. 2
      deob/src/main/java/dev/openrs2/deob/transform/FinalFieldTransformer.kt

@ -25,7 +25,9 @@ import java.lang.Character.PARAGRAPH_SEPARATOR
import java.lang.Character.PRIVATE_USE import java.lang.Character.PRIVATE_USE
import java.lang.Character.SURROGATE import java.lang.Character.SURROGATE
import java.lang.Character.UNASSIGNED import java.lang.Character.UNASSIGNED
import javax.inject.Singleton
@Singleton
class CharLiteralTransformer : Transformer() { class CharLiteralTransformer : Transformer() {
override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) { override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) {
unit.walk { expr: BinaryExpr -> unit.walk { expr: BinaryExpr ->

@ -11,7 +11,9 @@ import dev.openrs2.deob.ast.util.checkedAsInt
import dev.openrs2.deob.ast.util.checkedAsLong import dev.openrs2.deob.ast.util.checkedAsLong
import dev.openrs2.deob.ast.util.toHexLiteralExpr import dev.openrs2.deob.ast.util.toHexLiteralExpr
import dev.openrs2.deob.ast.util.walk import dev.openrs2.deob.ast.util.walk
import javax.inject.Singleton
@Singleton
class HexLiteralTransformer : Transformer() { class HexLiteralTransformer : Transformer() {
override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) { override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) {
unit.walk { expr: BinaryExpr -> unit.walk { expr: BinaryExpr ->

@ -13,7 +13,9 @@ import com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclarati
import dev.openrs2.deob.ast.Library import dev.openrs2.deob.ast.Library
import dev.openrs2.deob.ast.LibraryGroup import dev.openrs2.deob.ast.LibraryGroup
import dev.openrs2.deob.ast.util.walk import dev.openrs2.deob.ast.util.walk
import javax.inject.Singleton
@Singleton
class RedundantCastTransformer : Transformer() { class RedundantCastTransformer : Transformer() {
override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) { override fun transformUnit(group: LibraryGroup, library: Library, unit: CompilationUnit) {
// remove double casts // remove double casts

@ -17,7 +17,9 @@ import org.objectweb.asm.tree.FieldInsnNode
import org.objectweb.asm.tree.MethodInsnNode import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.analysis.Analyzer import org.objectweb.asm.tree.analysis.Analyzer
import javax.inject.Singleton
@Singleton
class FinalFieldTransformer : Transformer() { class FinalFieldTransformer : Transformer() {
private lateinit var inheritedFieldSets: DisjointSet<MemberRef> private lateinit var inheritedFieldSets: DisjointSet<MemberRef>
private val nonFinalFields = mutableSetOf<DisjointSet.Partition<MemberRef>>() private val nonFinalFields = mutableSetOf<DisjointSet.Partition<MemberRef>>()

Loading…
Cancel
Save