diff options
author | nea <nea@nea.moe> | 2023-03-10 20:13:43 +0100 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-03-10 20:13:43 +0100 |
commit | d0dd7dafbaccb79f1ecaa574b85dcbb648d35128 (patch) | |
tree | 156e8a2fb1cad9c89ad0f44cbc9a6bc08214b0d3 /src/main/kotlin/mcprepack/ProguardWriter.kt | |
parent | b8a858f0911f097eb557277d07b3568b7ec65789 (diff) | |
download | mcprepack-d0dd7dafbaccb79f1ecaa574b85dcbb648d35128.tar.gz mcprepack-d0dd7dafbaccb79f1ecaa574b85dcbb648d35128.tar.bz2 mcprepack-d0dd7dafbaccb79f1ecaa574b85dcbb648d35128.zip |
Proguard log
Diffstat (limited to 'src/main/kotlin/mcprepack/ProguardWriter.kt')
-rw-r--r-- | src/main/kotlin/mcprepack/ProguardWriter.kt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/kotlin/mcprepack/ProguardWriter.kt b/src/main/kotlin/mcprepack/ProguardWriter.kt new file mode 100644 index 0000000..64d84f8 --- /dev/null +++ b/src/main/kotlin/mcprepack/ProguardWriter.kt @@ -0,0 +1,35 @@ +package mcprepack + +import java.io.Writer + +data class ProguardWriter(val writer: Writer) { + fun visitClass(sourceName: String, targetName: String) { + writer.write(sourceName) + writer.write(" -> ") + writer.write(targetName) + writer.write(":\n") + } + + fun visitField(sourceName: String, targetName: String, proguardType: String) { + writer.write(" ") + writer.write(proguardType) + writer.write(" ") + writer.write(sourceName) + writer.write(" -> ") + writer.write(targetName) + writer.write("\n") + } + + fun visitMethod(sourceName: String, targetName: String, arguments: List<String>, returnType: String) { + writer.write(" ") + writer.write(returnType) + writer.write(" ") + writer.write(sourceName) + writer.write("(") + writer.write(arguments.joinToString(",")) + writer.write(") -> ") + writer.write(targetName) + writer.write("\n") + } + +}
\ No newline at end of file |