forked from openrs2/openrs2
This will make naming libraries easier, as we won't have to thread library names through every Library{Reader,Writer} implementation. Signed-off-by: Graham <gpe@openrs2.dev>
parent
72a0642db3
commit
091c0ed29e
@ -1,8 +1,8 @@ |
|||||||
package dev.openrs2.asm.io |
package dev.openrs2.asm.io |
||||||
|
|
||||||
import dev.openrs2.asm.classpath.Library |
import org.objectweb.asm.tree.ClassNode |
||||||
import java.io.InputStream |
import java.io.InputStream |
||||||
|
|
||||||
interface LibraryReader { |
interface LibraryReader { |
||||||
fun read(input: InputStream): Library |
fun read(input: InputStream): Iterable<ClassNode> |
||||||
} |
} |
||||||
|
@ -1,9 +1,9 @@ |
|||||||
package dev.openrs2.asm.io |
package dev.openrs2.asm.io |
||||||
|
|
||||||
import dev.openrs2.asm.classpath.ClassPath |
import dev.openrs2.asm.classpath.ClassPath |
||||||
import dev.openrs2.asm.classpath.Library |
import org.objectweb.asm.tree.ClassNode |
||||||
import java.io.OutputStream |
import java.io.OutputStream |
||||||
|
|
||||||
interface LibraryWriter { |
interface LibraryWriter { |
||||||
fun write(output: OutputStream, classPath: ClassPath, library: Library) |
fun write(output: OutputStream, classPath: ClassPath, classes: Iterable<ClassNode>) |
||||||
} |
} |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
package dev.openrs2.asm.io |
package dev.openrs2.asm.io |
||||||
|
|
||||||
import dev.openrs2.asm.classpath.Library |
import org.objectweb.asm.tree.ClassNode |
||||||
import java.io.InputStream |
import java.io.InputStream |
||||||
|
|
||||||
object PackClassLibraryReader : LibraryReader { |
object PackClassLibraryReader : LibraryReader { |
||||||
override fun read(input: InputStream): Library { |
override fun read(input: InputStream): Iterable<ClassNode> { |
||||||
// TODO(gpe): implement |
// TODO(gpe): implement |
||||||
return Library() |
return emptyList() |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
package dev.openrs2.asm.io |
package dev.openrs2.asm.io |
||||||
|
|
||||||
import dev.openrs2.asm.classpath.ClassPath |
import dev.openrs2.asm.classpath.ClassPath |
||||||
import dev.openrs2.asm.classpath.Library |
import org.objectweb.asm.tree.ClassNode |
||||||
import java.io.OutputStream |
import java.io.OutputStream |
||||||
|
|
||||||
object PackClassLibraryWriter : LibraryWriter { |
object PackClassLibraryWriter : LibraryWriter { |
||||||
override fun write(output: OutputStream, classPath: ClassPath, library: Library) { |
override fun write(output: OutputStream, classPath: ClassPath, classes: Iterable<ClassNode>) { |
||||||
// TODO(gpe): implement |
// TODO(gpe): implement |
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue