aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test4
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test4')
-rw-r--r--src/test/test4/InvokeDynCopyDest.java11
-rw-r--r--src/test/test4/InvokeDynCopySrc.java17
2 files changed, 28 insertions, 0 deletions
diff --git a/src/test/test4/InvokeDynCopyDest.java b/src/test/test4/InvokeDynCopyDest.java
new file mode 100644
index 00000000..003c7c53
--- /dev/null
+++ b/src/test/test4/InvokeDynCopyDest.java
@@ -0,0 +1,11 @@
+package test4;
+
+public class InvokeDynCopyDest {
+ public InvokeDynCopyDest() {
+ System.out.println("my output:" + getString());
+ }
+
+ public String getString() {
+ return "dest";
+ }
+}
diff --git a/src/test/test4/InvokeDynCopySrc.java b/src/test/test4/InvokeDynCopySrc.java
new file mode 100644
index 00000000..83291f7b
--- /dev/null
+++ b/src/test/test4/InvokeDynCopySrc.java
@@ -0,0 +1,17 @@
+package test4;
+
+import java.util.function.Supplier;
+
+public class InvokeDynCopySrc {
+ public InvokeDynCopySrc() {
+ System.out.println("source class:" + getString());
+ }
+
+ public String getString() {
+ Supplier<String> stringSupplier = () -> {
+ return "hello";
+ };
+
+ return stringSupplier.get();
+ }
+}