Skip to content

Instantly share code, notes, and snippets.

@mdproctor
Created September 21, 2021 15:03
Show Gist options
  • Save mdproctor/b1fda257d125298b7ea9404b4a59d567 to your computer and use it in GitHub Desktop.
Save mdproctor/b1fda257d125298b7ea9404b4a59d567 to your computer and use it in GitHub Desktop.
String a = code("import jsinterop.annotations.JsType;import jsinterop.annotations.JsMethod;import jsinterop.annotations.JsProperty;",
"@JsType\n" +
"public class A {\n",
" public String getMessage() {\n",
" return \"Hello from Java!\";\n",
" }\n",
"}");
String b = code("import jsinterop.annotations.JsType;import jsinterop.annotations.JsMethod;import jsinterop.annotations.JsProperty;",
"@JsType\n" +
"public class B {\n",
" public String getMessage() {\n",
" return new A().getMessage();\n",
" }",
"}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment