Skip to content

Instantly share code, notes, and snippets.

@mjg123
Last active May 9, 2018 12:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjg123/d06fd39ce1aedb3032edd463e814cdd1 to your computer and use it in GitHub Desktop.
Save mjg123/d06fd39ce1aedb3032edd463e814cdd1 to your computer and use it in GitHub Desktop.
A little class for re-writing Java method names when using `jaotc`
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