|
|
@ -4,7 +4,6 @@ import com.github.michaelbull.logging.InlineLogger |
|
|
|
import dev.openrs2.asm.classpath.ClassPath |
|
|
|
import dev.openrs2.asm.classpath.ClassPath |
|
|
|
import dev.openrs2.asm.classpath.Library |
|
|
|
import dev.openrs2.asm.classpath.Library |
|
|
|
import dev.openrs2.asm.transform.Transformer |
|
|
|
import dev.openrs2.asm.transform.Transformer |
|
|
|
import org.objectweb.asm.Opcodes |
|
|
|
|
|
|
|
import org.objectweb.asm.Type |
|
|
|
import org.objectweb.asm.Type |
|
|
|
import org.objectweb.asm.tree.ClassNode |
|
|
|
import org.objectweb.asm.tree.ClassNode |
|
|
|
import org.objectweb.asm.tree.FieldNode |
|
|
|
import org.objectweb.asm.tree.FieldNode |
|
|
@ -30,7 +29,7 @@ class EmptyClassTransformer : Transformer() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { |
|
|
|
override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { |
|
|
|
if (clazz.access and Opcodes.ACC_INTERFACE == 0 && clazz.fields.isEmpty() && clazz.methods.isEmpty()) { |
|
|
|
if (clazz.fields.isEmpty() && clazz.methods.isEmpty()) { |
|
|
|
emptyClasses.add(clazz.name) |
|
|
|
emptyClasses.add(clazz.name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -38,6 +37,10 @@ class EmptyClassTransformer : Transformer() { |
|
|
|
referencedClasses.add(clazz.superName) |
|
|
|
referencedClasses.add(clazz.superName) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (superInterface in clazz.interfaces) { |
|
|
|
|
|
|
|
referencedClasses.add(superInterface) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|