aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test4
diff options
context:
space:
mode:
authorLiuChuliang 刘楚梁 <chuliang.liu@smil.com>2024-01-18 16:11:16 +0800
committerLiuChuliang 刘楚梁 <chuliang.liu@smil.com>2024-01-18 16:11:16 +0800
commit9adc1a3526d58f7123a0837d4c5c68eb6a7099dd (patch)
tree263df0b2fc48f536fa02a57857de3776c0da0290 /src/test/test4
parent7302b8b0a09f04d344a26ebe57f29f3db43f2a3e (diff)
downloadjavassist-9adc1a3526d58f7123a0837d4c5c68eb6a7099dd.tar.gz
javassist-9adc1a3526d58f7123a0837d4c5c68eb6a7099dd.zip
support bootstrap method coping when using code coping
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();
+ }
+}