feat(java): Phase 1.5 — tree-sitter Java frontend, package-aware mv, e2e fixtures
This commit is contained in:
parent
55670030c3
commit
603f916ee9
25 changed files with 1288 additions and 366 deletions
|
|
@ -1 +0,0 @@
|
|||
> Planned Phase 1.5 fixture tree. `jmove` does not support Java yet; this folder intentionally holds only this note so nothing is dead code. See `docs/PLAN.md`.
|
||||
6
tests/java/basic/src/main/java/Main.java
Normal file
6
tests/java/basic/src/main/java/Main.java
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// No package declaration: the default package, un-importable.
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("hi");
|
||||
}
|
||||
}
|
||||
10
tests/java/basic/src/main/java/com/example/app/App.java
Normal file
10
tests/java/basic/src/main/java/com/example/app/App.java
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package com.example.app;
|
||||
|
||||
import com.example.util.Text;
|
||||
import static com.example.util.Text.shout;
|
||||
import com.example.unknown.*;
|
||||
import java.util.List;
|
||||
|
||||
public class App {
|
||||
private final List<String> items = List.of(shout("hi"), new Text().render());
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.example.model;
|
||||
|
||||
import com.example.util.Text;
|
||||
|
||||
public class User {
|
||||
String loudName() {
|
||||
return Text.shout("user");
|
||||
}
|
||||
}
|
||||
11
tests/java/basic/src/main/java/com/example/util/Text.java
Normal file
11
tests/java/basic/src/main/java/com/example/util/Text.java
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package com.example.util;
|
||||
|
||||
public class Text {
|
||||
public static String shout(String s) {
|
||||
return s.toUpperCase();
|
||||
}
|
||||
|
||||
public String render() {
|
||||
return "text";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue