!752

p {
  loadPage_debug = true; // see if we are using gzip
  S java = getServerTranspilation("#1004930");
  L<S> tok = javaTok(java);
  
  // TODO: change static fields & methods in inner classes
  // (kinda hard). We need to find out what every token in
  // such a method references, also pass in a reference to main.
  // Alternatively: Move all those methods to main, and fix
  // references inside of them. That might be doable.
  // We need a Java destructurer (field & method finder).
  
  // Idea: Find all static fields & methods in inner classes.
  // Then rename references to them, both inside the class and in main.
  
  jreplace(tok, "static", "");
  jreplace1(tok, "main.", "main.this.");
  jreplace1(tok, "main.this.class", "main.this");
  
  S src = join(tok);
  
  editJavaX(src);
  
  javaCompile(src);
  print("Compiles!");
}