Last active
May 9, 2018 12:42
-
-
Save mjg123/d06fd39ce1aedb3032edd463e814cdd1 to your computer and use it in GitHub Desktop.
A little class for re-writing Java method names when using `jaotc`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Convert { | |
public static void main(String args[]) throws Throwable { | |
int i; | |
boolean inParams = false; | |
while ((i = System.in.read()) >= 0) { | |
switch (i) { | |
case ':': | |
continue; // skip | |
case '/': | |
if (!inParams) { | |
i = '.'; | |
} | |
break; | |
case '(': | |
inParams = true; | |
break; | |
case '\n': | |
case '\r': | |
inParams = false; | |
break; | |
} | |
System.out.write(i); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment