diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrinterImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrinterImpl.java
index c7617f07257..989589d0a01 100644
--- a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrinterImpl.java
+++ b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassPrinterImpl.java
@@ -817,13 +817,15 @@ public final class ClassPrinterImpl {
"owner", inv.owner().name().stringValue(),
"method name", inv.name().stringValue(),
"method type", inv.type().stringValue()));
- case InvokeDynamicInstruction invd -> in.with(leafs(
+ case InvokeDynamicInstruction invd -> {
+ in.with(leafs(
"name", invd.name().stringValue(),
"descriptor", invd.type().stringValue(),
- "kind", invd.bootstrapMethod().kind().name(),
- "owner", invd.bootstrapMethod().owner().descriptorString(),
- "method name", invd.bootstrapMethod().methodName(),
- "invocation type", invd.bootstrapMethod().invocationType().descriptorString()));
+ "bootstrap method", invd.bootstrapMethod().kind().name()
+ + " " + Util.toInternalName(invd.bootstrapMethod().owner())
+ + "::" + invd.bootstrapMethod().methodName()));
+ in.with(list("arguments", "arg", invd.bootstrapArgs().stream()));
+ }
case NewObjectInstruction newo -> in.with(leaf(
"type", newo.className().name().stringValue()));
case NewPrimitiveArrayInstruction newa -> in.with(leafs(
@@ -884,12 +886,15 @@ public final class ClassPrinterImpl {
bm -> {
var mh = bm.bootstrapMethod();
var mref = mh.reference();
- return map("bm",
+ var bmNode = new MapNodeImpl(FLOW, "bm");
+ bmNode.with(leafs(
+ "index", bm.bsmIndex(),
"kind", DirectMethodHandleDesc.Kind.valueOf(mh.kind(),
mref instanceof InterfaceMethodRefEntry).name(),
- "owner", mref.owner().name().stringValue(),
- "name", mref.nameAndType().name().stringValue(),
- "type", mref.nameAndType().type().stringValue());
+ "owner", mref.owner().asInternalName(),
+ "name", mref.nameAndType().name().stringValue()));
+ bmNode.with(list("args", "arg", bm.arguments().stream().map(LoadableConstantEntry::constantValue)));
+ return bmNode;
})));
case ConstantValueAttribute cva ->
nodes.add(leaf("constant value", cva.constant().constantValue()));
diff --git a/test/jdk/jdk/classfile/ClassPrinterTest.java b/test/jdk/jdk/classfile/ClassPrinterTest.java
index b75beee4f88..6400dc4f5df 100644
--- a/test/jdk/jdk/classfile/ClassPrinterTest.java
+++ b/test/jdk/jdk/classfile/ClassPrinterTest.java
@@ -35,6 +35,9 @@ import java.util.Optional;
import java.lang.classfile.*;
import java.lang.classfile.attribute.*;
import java.lang.classfile.components.ClassPrinter;
+import java.lang.constant.DirectMethodHandleDesc;
+import java.lang.constant.DynamicCallSiteDesc;
+import java.lang.constant.MethodHandleDesc;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -98,6 +101,12 @@ class ClassPrinterTest {
TypeAnnotation.of(TypeAnnotation.TargetInfo.ofField(),
List.of(TypeAnnotation.TypePathComponent.WILDCARD),
ClassDesc.of("Boo"), List.of())));
+ tryb.invokedynamic(DynamicCallSiteDesc.of(
+ MethodHandleDesc.ofMethod(DirectMethodHandleDesc.Kind.STATIC, ClassDesc.of("Phoo"), "phee", MethodTypeDesc.of(ClassDesc.of("Boo"))),
+ "intfMethod",
+ MethodTypeDesc.of(ClassDesc.of("Boo")),
+ "bootstrap argument 1",
+ "bootstrap argument 2"));
tryb.return_();
}, catchb -> catchb.catching(ClassDesc.of("Phee"), cb -> {
cb.lineNumber(4);
@@ -121,7 +130,7 @@ class ClassPrinterTest {
flags: [PUBLIC]
superclass: Boo
interfaces: [Phee, Phoo]
- attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses]
+ attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses, BootstrapMethods]
constant pool:
1: {tag: Utf8, value: Foo}
2: {tag: Class, class name index: 1, class internal name: Foo}
@@ -133,68 +142,81 @@ class ClassPrinterTest {
8: {tag: Utf8, value: (ZLjava/lang/Throwable;)Ljava/lang/Void;}
9: {tag: Utf8, value: variable}
10: {tag: Utf8, value: LPhoo;}
- 11: {tag: Utf8, value: Phee}
- 12: {tag: Class, class name index: 11, class internal name: Phee}
- 13: {tag: Utf8, value: Phoo}
- 14: {tag: Class, class name index: 13, class internal name: Phoo}
- 15: {tag: Utf8, value: RuntimeVisibleAnnotations}
- 16: {tag: Utf8, value: flfl}
- 17: {tag: Float, value: 0.0}
- 18: {tag: Utf8, value: frfl}
- 19: {tag: Float, value: 1.0}
- 20: {tag: Utf8, value: AnnotationDefault}
- 21: {tag: Integer, value: 1}
- 22: {tag: Integer, value: 12}
- 23: {tag: Integer, value: 99}
- 24: {tag: Utf8, value: LPhee;}
- 25: {tag: Double, value: 1.3}
- 27: {tag: Utf8, value: LBoo;}
- 28: {tag: Utf8, value: BOO}
- 29: {tag: Float, value: 3.7}
- 30: {tag: Integer, value: 33}
- 31: {tag: Long, value: 3333}
- 33: {tag: Integer, value: 25}
- 34: {tag: Utf8, value: param}
- 35: {tag: Integer, value: 3}
- 36: {tag: Utf8, value: RuntimeVisibleParameterAnnotations}
- 37: {tag: Float, value: 22.0}
- 38: {tag: Float, value: 11.0}
- 39: {tag: Utf8, value: RuntimeInvisibleParameterAnnotations}
- 40: {tag: Float, value: '-22.0'}
- 41: {tag: Float, value: '-11.0'}
- 42: {tag: Utf8, value: Exceptions}
- 43: {tag: Utf8, value: Bee}
- 44: {tag: Class, class name index: 43, class internal name: Bee}
- 45: {tag: Utf8, value: Code}
- 46: {tag: Utf8, value: RuntimeInvisibleTypeAnnotations}
- 47: {tag: Utf8, value: RuntimeVisibleTypeAnnotations}
- 48: {tag: Utf8, value: LFee;}
- 49: {tag: Utf8, value: yes}
- 50: {tag: Integer, value: 0}
- 51: {tag: Utf8, value: LocalVariableTable}
- 52: {tag: Utf8, value: LocalVariableTypeTable}
- 53: {tag: Utf8, value: LineNumberTable}
- 54: {tag: Utf8, value: StackMapTable}
- 55: {tag: Utf8, value: SourceFile}
- 56: {tag: Utf8, value: Foo.java}
- 57: {tag: Utf8, value: InnerClasses}
- 58: {tag: Utf8, value: InnerName}
- 59: {tag: Utf8, value: EnclosingMethod}
- 60: {tag: Utf8, value: enclosingMethod}
- 61: {tag: Utf8, value: (Ljava/util/Collection;)Ljava/lang/Double;}
- 62: {tag: NameAndType, name index: 60, type index: 61, name: enclosingMethod, type: (Ljava/util/Collection;)Ljava/lang/Double;}
- 63: {tag: Utf8, value: Synthetic}
- 64: {tag: Utf8, value: Signature}
- 65: {tag: Utf8, value: LBoo;LPhee;LPhoo;}
- 66: {tag: Utf8, value: Deprecated}
- 67: {tag: Utf8, value: NestHost}
- 68: {tag: Utf8, value: NestMembers}
- 69: {tag: Utf8, value: Record}
- 70: {tag: Utf8, value: fee}
- 71: {tag: Utf8, value: RuntimeInvisibleAnnotations}
- 72: {tag: Float, value: 2.0}
- 73: {tag: Float, value: 3.0}
- 74: {tag: Utf8, value: PermittedSubclasses}
+ 11: {tag: Utf8, value: Phoo}
+ 12: {tag: Class, class name index: 11, class internal name: Phoo}
+ 13: {tag: Utf8, value: phee}
+ 14: {tag: Utf8, value: ()LBoo;}
+ 15: {tag: NameAndType, name index: 13, type index: 14, name: phee, type: ()LBoo;}
+ 16: {tag: Methodref, owner index: 12, name and type index: 15, owner: Phoo, name: phee, type: ()LBoo;}
+ 17: {tag: MethodHandle, reference kind: STATIC, reference index: 16, owner: Phoo, name: phee, type: ()LBoo;}
+ 18: {tag: Utf8, value: bootstrap argument 1}
+ 19: {tag: String, value index: 18, value: bootstrap argument 1}
+ 20: {tag: Utf8, value: bootstrap argument 2}
+ 21: {tag: String, value index: 20, value: bootstrap argument 2}
+ 22: {tag: Utf8, value: intfMethod}
+ 23: {tag: NameAndType, name index: 22, type index: 14, name: intfMethod, type: ()LBoo;}
+ 24: {tag: InvokeDynamic, bootstrap method handle index: 17, bootstrap method arguments indexes: [19, 21], name and type index: 23, name: intfMethod, type: ()LBoo;}
+ 25: {tag: Utf8, value: Phee}
+ 26: {tag: Class, class name index: 25, class internal name: Phee}
+ 27: {tag: Utf8, value: RuntimeVisibleAnnotations}
+ 28: {tag: Utf8, value: flfl}
+ 29: {tag: Float, value: 0.0}
+ 30: {tag: Utf8, value: frfl}
+ 31: {tag: Float, value: 1.0}
+ 32: {tag: Utf8, value: AnnotationDefault}
+ 33: {tag: Integer, value: 1}
+ 34: {tag: Integer, value: 12}
+ 35: {tag: Integer, value: 99}
+ 36: {tag: Utf8, value: LPhee;}
+ 37: {tag: Double, value: 1.3}
+ 39: {tag: Utf8, value: LBoo;}
+ 40: {tag: Utf8, value: BOO}
+ 41: {tag: Float, value: 3.7}
+ 42: {tag: Integer, value: 33}
+ 43: {tag: Long, value: 3333}
+ 45: {tag: Integer, value: 25}
+ 46: {tag: Utf8, value: param}
+ 47: {tag: Integer, value: 3}
+ 48: {tag: Utf8, value: RuntimeVisibleParameterAnnotations}
+ 49: {tag: Float, value: 22.0}
+ 50: {tag: Float, value: 11.0}
+ 51: {tag: Utf8, value: RuntimeInvisibleParameterAnnotations}
+ 52: {tag: Float, value: '-22.0'}
+ 53: {tag: Float, value: '-11.0'}
+ 54: {tag: Utf8, value: Exceptions}
+ 55: {tag: Utf8, value: Bee}
+ 56: {tag: Class, class name index: 55, class internal name: Bee}
+ 57: {tag: Utf8, value: Code}
+ 58: {tag: Utf8, value: RuntimeInvisibleTypeAnnotations}
+ 59: {tag: Utf8, value: RuntimeVisibleTypeAnnotations}
+ 60: {tag: Utf8, value: LFee;}
+ 61: {tag: Utf8, value: yes}
+ 62: {tag: Integer, value: 0}
+ 63: {tag: Utf8, value: LocalVariableTable}
+ 64: {tag: Utf8, value: LocalVariableTypeTable}
+ 65: {tag: Utf8, value: LineNumberTable}
+ 66: {tag: Utf8, value: StackMapTable}
+ 67: {tag: Utf8, value: SourceFile}
+ 68: {tag: Utf8, value: Foo.java}
+ 69: {tag: Utf8, value: InnerClasses}
+ 70: {tag: Utf8, value: InnerName}
+ 71: {tag: Utf8, value: EnclosingMethod}
+ 72: {tag: Utf8, value: enclosingMethod}
+ 73: {tag: Utf8, value: (Ljava/util/Collection;)Ljava/lang/Double;}
+ 74: {tag: NameAndType, name index: 72, type index: 73, name: enclosingMethod, type: (Ljava/util/Collection;)Ljava/lang/Double;}
+ 75: {tag: Utf8, value: Synthetic}
+ 76: {tag: Utf8, value: Signature}
+ 77: {tag: Utf8, value: LBoo;LPhee;LPhoo;}
+ 78: {tag: Utf8, value: Deprecated}
+ 79: {tag: Utf8, value: NestHost}
+ 80: {tag: Utf8, value: NestMembers}
+ 81: {tag: Utf8, value: Record}
+ 82: {tag: Utf8, value: fee}
+ 83: {tag: Utf8, value: RuntimeInvisibleAnnotations}
+ 84: {tag: Float, value: 2.0}
+ 85: {tag: Float, value: 3.0}
+ 86: {tag: Utf8, value: PermittedSubclasses}
+ 87: {tag: Utf8, value: BootstrapMethods}
source file: Foo.java
inner classes:
- {inner class: Phee, outer class: Phoo, inner name: InnerName, flags: [PROTECTED]}
@@ -213,6 +235,8 @@ class ClassPrinterTest {
invisible annotations:
- {annotation class: LPhoo;, values: [{name: flfl, value: {float: 2.0}}, {name: frfl, value: {float: 3.0}}]}
permitted subclasses: [Boo, Phoo]
+ bootstrap methods:
+ - {index: 0, kind: STATIC, owner: Phoo, name: phee, args: [bootstrap argument 1, bootstrap argument 2]}
fields:
- field name: f
flags: [PRIVATE]
@@ -236,35 +260,36 @@ class ClassPrinterTest {
max locals: 3
attributes: [RuntimeInvisibleTypeAnnotations, RuntimeVisibleTypeAnnotations, LocalVariableTable, LocalVariableTypeTable, LineNumberTable, StackMapTable]
local variables:
- - {start: 0, end: 7, slot: 2, name: variable, type: LPhoo;}
+ - {start: 0, end: 12, slot: 2, name: variable, type: LPhoo;}
local variable types:
- - {start: 0, end: 7, slot: 2, name: variable, signature: LPhoo;}
+ - {start: 0, end: 12, slot: 2, name: variable, signature: LPhoo;}
line numbers:
- {start: 0, line number: 1}
- {start: 1, line number: 2}
- {start: 6, line number: 3}
- - {start: 7, line number: 4}
+ - {start: 12, line number: 4}
stack map frames:
6: {locals: [Foo, int, java/lang/Throwable], stack: []}
- 7: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
+ 12: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
invisible type annotations:
- {annotation class: LBoo;, target info: FIELD, values: []}
visible type annotations:
- {annotation class: LFee;, target info: FIELD, values: [{name: yes, value: {boolean: false}}]}
//stack map frame @0: {locals: [Foo, int, java/lang/Throwable], stack: []}
- //try block 1 start: {start: 0, end: 7, handler: 7, catch type: Phee}
+ //try block 1 start: {start: 0, end: 12, handler: 12, catch type: Phee}
0: {opcode: ILOAD_1, slot: 1}
1: {opcode: IFEQ, target: 6}
4: {opcode: ALOAD_2, slot: 2, type: LPhoo;, variable name: variable}
5: {opcode: ATHROW}
//stack map frame @6: {locals: [Foo, int, java/lang/Throwable], stack: []}
- 6: {opcode: RETURN}
- //stack map frame @7: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
- //try block 1 end: {start: 0, end: 7, handler: 7, catch type: Phee}
- //exception handler 1 start: {start: 0, end: 7, handler: 7, catch type: Phee}
- 7: {opcode: ATHROW}
+ 6: {opcode: INVOKEDYNAMIC, name: intfMethod, descriptor: ()LBoo;, bootstrap method: STATIC Phoo::phee, arguments: [bootstrap argument 1, bootstrap argument 2]}
+ 11: {opcode: RETURN}
+ //stack map frame @12: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
+ //try block 1 end: {start: 0, end: 12, handler: 12, catch type: Phee}
+ //exception handler 1 start: {start: 0, end: 12, handler: 12, catch type: Phee}
+ 12: {opcode: ATHROW}
exception handlers:
- handler 1: {start: 0, end: 7, handler: 7, type: Phee}
+ handler 1: {start: 0, end: 12, handler: 12, type: Phee}
""");
}
@@ -279,10 +304,12 @@ class ClassPrinterTest {
flags: [PUBLIC]
superclass: Boo
interfaces: [Phee, Phoo]
- attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses]
+ attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses, BootstrapMethods]
nest host: Phee
nest members: [Phoo, Boo, Bee]
permitted subclasses: [Boo, Phoo]
+ bootstrap methods:
+ - {index: 0, kind: STATIC, owner: Phoo, name: phee, args: [bootstrap argument 1, bootstrap argument 2]}
fields:
- field name: f
flags: [PRIVATE]
@@ -299,21 +326,22 @@ class ClassPrinterTest {
attributes: [RuntimeInvisibleTypeAnnotations, RuntimeVisibleTypeAnnotations, LocalVariableTable, LocalVariableTypeTable, LineNumberTable, StackMapTable]
stack map frames:
6: {locals: [Foo, int, java/lang/Throwable], stack: []}
- 7: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
+ 12: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
//stack map frame @0: {locals: [Foo, int, java/lang/Throwable], stack: []}
- //try block 1 start: {start: 0, end: 7, handler: 7, catch type: Phee}
+ //try block 1 start: {start: 0, end: 12, handler: 12, catch type: Phee}
0: {opcode: ILOAD_1, slot: 1}
1: {opcode: IFEQ, target: 6}
4: {opcode: ALOAD_2, slot: 2}
5: {opcode: ATHROW}
//stack map frame @6: {locals: [Foo, int, java/lang/Throwable], stack: []}
- 6: {opcode: RETURN}
- //stack map frame @7: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
- //try block 1 end: {start: 0, end: 7, handler: 7, catch type: Phee}
- //exception handler 1 start: {start: 0, end: 7, handler: 7, catch type: Phee}
- 7: {opcode: ATHROW}
+ 6: {opcode: INVOKEDYNAMIC, name: intfMethod, descriptor: ()LBoo;, bootstrap method: STATIC Phoo::phee, arguments: [bootstrap argument 1, bootstrap argument 2]}
+ 11: {opcode: RETURN}
+ //stack map frame @12: {locals: [Foo, int, java/lang/Throwable], stack: [Phee]}
+ //try block 1 end: {start: 0, end: 12, handler: 12, catch type: Phee}
+ //exception handler 1 start: {start: 0, end: 12, handler: 12, catch type: Phee}
+ 12: {opcode: ATHROW}
exception handlers:
- handler 1: {start: 0, end: 7, handler: 7, type: Phee}
+ handler 1: {start: 0, end: 12, handler: 12, type: Phee}
""");
}
@@ -328,7 +356,7 @@ class ClassPrinterTest {
flags: [PUBLIC]
superclass: Boo
interfaces: [Phee, Phoo]
- attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses]
+ attributes: [SourceFile, InnerClasses, EnclosingMethod, Synthetic, Signature, Deprecated, NestHost, NestMembers, Record, RuntimeInvisibleAnnotations, PermittedSubclasses, BootstrapMethods]
fields:
- field name: f
flags: [PRIVATE]
@@ -353,7 +381,7 @@ class ClassPrinterTest {
"flags": ["PUBLIC"],
"superclass": "Boo",
"interfaces": ["Phee", "Phoo"],
- "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses"],
+ "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses", "BootstrapMethods"],
"constant pool": {
"1": {"tag": "Utf8", "value": "Foo"},
"2": {"tag": "Class", "class name index": 1, "class internal name": "Foo"},
@@ -365,68 +393,81 @@ class ClassPrinterTest {
"8": {"tag": "Utf8", "value": "(ZLjava/lang/Throwable;)Ljava/lang/Void;"},
"9": {"tag": "Utf8", "value": "variable"},
"10": {"tag": "Utf8", "value": "LPhoo;"},
- "11": {"tag": "Utf8", "value": "Phee"},
- "12": {"tag": "Class", "class name index": 11, "class internal name": "Phee"},
- "13": {"tag": "Utf8", "value": "Phoo"},
- "14": {"tag": "Class", "class name index": 13, "class internal name": "Phoo"},
- "15": {"tag": "Utf8", "value": "RuntimeVisibleAnnotations"},
- "16": {"tag": "Utf8", "value": "flfl"},
- "17": {"tag": "Float", "value": "0.0"},
- "18": {"tag": "Utf8", "value": "frfl"},
- "19": {"tag": "Float", "value": "1.0"},
- "20": {"tag": "Utf8", "value": "AnnotationDefault"},
- "21": {"tag": "Integer", "value": "1"},
- "22": {"tag": "Integer", "value": "12"},
- "23": {"tag": "Integer", "value": "99"},
- "24": {"tag": "Utf8", "value": "LPhee;"},
- "25": {"tag": "Double", "value": "1.3"},
- "27": {"tag": "Utf8", "value": "LBoo;"},
- "28": {"tag": "Utf8", "value": "BOO"},
- "29": {"tag": "Float", "value": "3.7"},
- "30": {"tag": "Integer", "value": "33"},
- "31": {"tag": "Long", "value": "3333"},
- "33": {"tag": "Integer", "value": "25"},
- "34": {"tag": "Utf8", "value": "param"},
- "35": {"tag": "Integer", "value": "3"},
- "36": {"tag": "Utf8", "value": "RuntimeVisibleParameterAnnotations"},
- "37": {"tag": "Float", "value": "22.0"},
- "38": {"tag": "Float", "value": "11.0"},
- "39": {"tag": "Utf8", "value": "RuntimeInvisibleParameterAnnotations"},
- "40": {"tag": "Float", "value": "-22.0"},
- "41": {"tag": "Float", "value": "-11.0"},
- "42": {"tag": "Utf8", "value": "Exceptions"},
- "43": {"tag": "Utf8", "value": "Bee"},
- "44": {"tag": "Class", "class name index": 43, "class internal name": "Bee"},
- "45": {"tag": "Utf8", "value": "Code"},
- "46": {"tag": "Utf8", "value": "RuntimeInvisibleTypeAnnotations"},
- "47": {"tag": "Utf8", "value": "RuntimeVisibleTypeAnnotations"},
- "48": {"tag": "Utf8", "value": "LFee;"},
- "49": {"tag": "Utf8", "value": "yes"},
- "50": {"tag": "Integer", "value": "0"},
- "51": {"tag": "Utf8", "value": "LocalVariableTable"},
- "52": {"tag": "Utf8", "value": "LocalVariableTypeTable"},
- "53": {"tag": "Utf8", "value": "LineNumberTable"},
- "54": {"tag": "Utf8", "value": "StackMapTable"},
- "55": {"tag": "Utf8", "value": "SourceFile"},
- "56": {"tag": "Utf8", "value": "Foo.java"},
- "57": {"tag": "Utf8", "value": "InnerClasses"},
- "58": {"tag": "Utf8", "value": "InnerName"},
- "59": {"tag": "Utf8", "value": "EnclosingMethod"},
- "60": {"tag": "Utf8", "value": "enclosingMethod"},
- "61": {"tag": "Utf8", "value": "(Ljava/util/Collection;)Ljava/lang/Double;"},
- "62": {"tag": "NameAndType", "name index": 60, "type index": 61, "name": "enclosingMethod", "type": "(Ljava/util/Collection;)Ljava/lang/Double;"},
- "63": {"tag": "Utf8", "value": "Synthetic"},
- "64": {"tag": "Utf8", "value": "Signature"},
- "65": {"tag": "Utf8", "value": "LBoo;LPhee;LPhoo;"},
- "66": {"tag": "Utf8", "value": "Deprecated"},
- "67": {"tag": "Utf8", "value": "NestHost"},
- "68": {"tag": "Utf8", "value": "NestMembers"},
- "69": {"tag": "Utf8", "value": "Record"},
- "70": {"tag": "Utf8", "value": "fee"},
- "71": {"tag": "Utf8", "value": "RuntimeInvisibleAnnotations"},
- "72": {"tag": "Float", "value": "2.0"},
- "73": {"tag": "Float", "value": "3.0"},
- "74": {"tag": "Utf8", "value": "PermittedSubclasses"}},
+ "11": {"tag": "Utf8", "value": "Phoo"},
+ "12": {"tag": "Class", "class name index": 11, "class internal name": "Phoo"},
+ "13": {"tag": "Utf8", "value": "phee"},
+ "14": {"tag": "Utf8", "value": "()LBoo;"},
+ "15": {"tag": "NameAndType", "name index": 13, "type index": 14, "name": "phee", "type": "()LBoo;"},
+ "16": {"tag": "Methodref", "owner index": 12, "name and type index": 15, "owner": "Phoo", "name": "phee", "type": "()LBoo;"},
+ "17": {"tag": "MethodHandle", "reference kind": "STATIC", "reference index": 16, "owner": "Phoo", "name": "phee", "type": "()LBoo;"},
+ "18": {"tag": "Utf8", "value": "bootstrap argument 1"},
+ "19": {"tag": "String", "value index": 18, "value": "bootstrap argument 1"},
+ "20": {"tag": "Utf8", "value": "bootstrap argument 2"},
+ "21": {"tag": "String", "value index": 20, "value": "bootstrap argument 2"},
+ "22": {"tag": "Utf8", "value": "intfMethod"},
+ "23": {"tag": "NameAndType", "name index": 22, "type index": 14, "name": "intfMethod", "type": "()LBoo;"},
+ "24": {"tag": "InvokeDynamic", "bootstrap method handle index": 17, "bootstrap method arguments indexes": [19, 21], "name and type index": 23, "name": "intfMethod", "type": "()LBoo;"},
+ "25": {"tag": "Utf8", "value": "Phee"},
+ "26": {"tag": "Class", "class name index": 25, "class internal name": "Phee"},
+ "27": {"tag": "Utf8", "value": "RuntimeVisibleAnnotations"},
+ "28": {"tag": "Utf8", "value": "flfl"},
+ "29": {"tag": "Float", "value": "0.0"},
+ "30": {"tag": "Utf8", "value": "frfl"},
+ "31": {"tag": "Float", "value": "1.0"},
+ "32": {"tag": "Utf8", "value": "AnnotationDefault"},
+ "33": {"tag": "Integer", "value": "1"},
+ "34": {"tag": "Integer", "value": "12"},
+ "35": {"tag": "Integer", "value": "99"},
+ "36": {"tag": "Utf8", "value": "LPhee;"},
+ "37": {"tag": "Double", "value": "1.3"},
+ "39": {"tag": "Utf8", "value": "LBoo;"},
+ "40": {"tag": "Utf8", "value": "BOO"},
+ "41": {"tag": "Float", "value": "3.7"},
+ "42": {"tag": "Integer", "value": "33"},
+ "43": {"tag": "Long", "value": "3333"},
+ "45": {"tag": "Integer", "value": "25"},
+ "46": {"tag": "Utf8", "value": "param"},
+ "47": {"tag": "Integer", "value": "3"},
+ "48": {"tag": "Utf8", "value": "RuntimeVisibleParameterAnnotations"},
+ "49": {"tag": "Float", "value": "22.0"},
+ "50": {"tag": "Float", "value": "11.0"},
+ "51": {"tag": "Utf8", "value": "RuntimeInvisibleParameterAnnotations"},
+ "52": {"tag": "Float", "value": "-22.0"},
+ "53": {"tag": "Float", "value": "-11.0"},
+ "54": {"tag": "Utf8", "value": "Exceptions"},
+ "55": {"tag": "Utf8", "value": "Bee"},
+ "56": {"tag": "Class", "class name index": 55, "class internal name": "Bee"},
+ "57": {"tag": "Utf8", "value": "Code"},
+ "58": {"tag": "Utf8", "value": "RuntimeInvisibleTypeAnnotations"},
+ "59": {"tag": "Utf8", "value": "RuntimeVisibleTypeAnnotations"},
+ "60": {"tag": "Utf8", "value": "LFee;"},
+ "61": {"tag": "Utf8", "value": "yes"},
+ "62": {"tag": "Integer", "value": "0"},
+ "63": {"tag": "Utf8", "value": "LocalVariableTable"},
+ "64": {"tag": "Utf8", "value": "LocalVariableTypeTable"},
+ "65": {"tag": "Utf8", "value": "LineNumberTable"},
+ "66": {"tag": "Utf8", "value": "StackMapTable"},
+ "67": {"tag": "Utf8", "value": "SourceFile"},
+ "68": {"tag": "Utf8", "value": "Foo.java"},
+ "69": {"tag": "Utf8", "value": "InnerClasses"},
+ "70": {"tag": "Utf8", "value": "InnerName"},
+ "71": {"tag": "Utf8", "value": "EnclosingMethod"},
+ "72": {"tag": "Utf8", "value": "enclosingMethod"},
+ "73": {"tag": "Utf8", "value": "(Ljava/util/Collection;)Ljava/lang/Double;"},
+ "74": {"tag": "NameAndType", "name index": 72, "type index": 73, "name": "enclosingMethod", "type": "(Ljava/util/Collection;)Ljava/lang/Double;"},
+ "75": {"tag": "Utf8", "value": "Synthetic"},
+ "76": {"tag": "Utf8", "value": "Signature"},
+ "77": {"tag": "Utf8", "value": "LBoo;LPhee;LPhoo;"},
+ "78": {"tag": "Utf8", "value": "Deprecated"},
+ "79": {"tag": "Utf8", "value": "NestHost"},
+ "80": {"tag": "Utf8", "value": "NestMembers"},
+ "81": {"tag": "Utf8", "value": "Record"},
+ "82": {"tag": "Utf8", "value": "fee"},
+ "83": {"tag": "Utf8", "value": "RuntimeInvisibleAnnotations"},
+ "84": {"tag": "Float", "value": "2.0"},
+ "85": {"tag": "Float", "value": "3.0"},
+ "86": {"tag": "Utf8", "value": "PermittedSubclasses"},
+ "87": {"tag": "Utf8", "value": "BootstrapMethods"}},
"source file": "Foo.java",
"inner classes": [
{"inner class": "Phee", "outer class": "Phoo", "inner name": "InnerName", "flags": ["PROTECTED"]},
@@ -445,6 +486,8 @@ class ClassPrinterTest {
"invisible annotations": [
{"annotation class": "LPhoo;", "values": [{"name": "flfl", "value": {"float": "2.0"}}, {"name": "frfl", "value": {"float": "3.0"}}]}],
"permitted subclasses": ["Boo", "Phoo"],
+ "bootstrap methods": [
+ {"index": 0, "kind": "STATIC", "owner": "Phoo", "name": "phee", "args": ["bootstrap argument 1", "bootstrap argument 2"]}],
"fields": [
{ "field name": "f",
"flags": ["PRIVATE"],
@@ -468,35 +511,36 @@ class ClassPrinterTest {
"max locals": 3,
"attributes": ["RuntimeInvisibleTypeAnnotations", "RuntimeVisibleTypeAnnotations", "LocalVariableTable", "LocalVariableTypeTable", "LineNumberTable", "StackMapTable"],
"local variables": [
- {"start": 0, "end": 7, "slot": 2, "name": "variable", "type": "LPhoo;"}],
+ {"start": 0, "end": 12, "slot": 2, "name": "variable", "type": "LPhoo;"}],
"local variable types": [
- {"start": 0, "end": 7, "slot": 2, "name": "variable", "signature": "LPhoo;"}],
+ {"start": 0, "end": 12, "slot": 2, "name": "variable", "signature": "LPhoo;"}],
"line numbers": [
{"start": 0, "line number": 1},
{"start": 1, "line number": 2},
{"start": 6, "line number": 3},
- {"start": 7, "line number": 4}],
+ {"start": 12, "line number": 4}],
"stack map frames": {
"6": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "7": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]}},
+ "12": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]}},
"invisible type annotations": [
{"annotation class": "LBoo;", "target info": "FIELD", "values": []}],
"visible type annotations": [
{"annotation class": "LFee;", "target info": "FIELD", "values": [{"name": "yes", "value": {"boolean": "false"}}]}],
"//stack map frame @0": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "//try block 1 start": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
+ "//try block 1 start": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
"0": {"opcode": "ILOAD_1", "slot": 1},
"1": {"opcode": "IFEQ", "target": 6},
"4": {"opcode": "ALOAD_2", "slot": 2, "type": "LPhoo;", "variable name": "variable"},
"5": {"opcode": "ATHROW"},
"//stack map frame @6": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "6": {"opcode": "RETURN"},
- "//stack map frame @7": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]},
- "//try block 1 end": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
- "//exception handler 1 start": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
- "7": {"opcode": "ATHROW"},
+ "6": {"opcode": "INVOKEDYNAMIC", "name": "intfMethod", "descriptor": "()LBoo;", "bootstrap method": "STATIC Phoo::phee", "arguments": ["bootstrap argument 1", "bootstrap argument 2"]},
+ "11": {"opcode": "RETURN"},
+ "//stack map frame @12": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]},
+ "//try block 1 end": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
+ "//exception handler 1 start": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
+ "12": {"opcode": "ATHROW"},
"exception handlers": {
- "handler 1": {"start": 0, "end": 7, "handler": 7, "type": "Phee"}}}}]}
+ "handler 1": {"start": 0, "end": 12, "handler": 12, "type": "Phee"}}}}]}
""");
}
@@ -511,10 +555,12 @@ class ClassPrinterTest {
"flags": ["PUBLIC"],
"superclass": "Boo",
"interfaces": ["Phee", "Phoo"],
- "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses"],
+ "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses", "BootstrapMethods"],
"nest host": "Phee",
"nest members": ["Phoo", "Boo", "Bee"],
"permitted subclasses": ["Boo", "Phoo"],
+ "bootstrap methods": [
+ {"index": 0, "kind": "STATIC", "owner": "Phoo", "name": "phee", "args": ["bootstrap argument 1", "bootstrap argument 2"]}],
"fields": [
{ "field name": "f",
"flags": ["PRIVATE"],
@@ -531,21 +577,22 @@ class ClassPrinterTest {
"attributes": ["RuntimeInvisibleTypeAnnotations", "RuntimeVisibleTypeAnnotations", "LocalVariableTable", "LocalVariableTypeTable", "LineNumberTable", "StackMapTable"],
"stack map frames": {
"6": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "7": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]}},
+ "12": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]}},
"//stack map frame @0": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "//try block 1 start": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
+ "//try block 1 start": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
"0": {"opcode": "ILOAD_1", "slot": 1},
"1": {"opcode": "IFEQ", "target": 6},
"4": {"opcode": "ALOAD_2", "slot": 2},
"5": {"opcode": "ATHROW"},
"//stack map frame @6": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": []},
- "6": {"opcode": "RETURN"},
- "//stack map frame @7": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]},
- "//try block 1 end": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
- "//exception handler 1 start": {"start": 0, "end": 7, "handler": 7, "catch type": "Phee"},
- "7": {"opcode": "ATHROW"},
+ "6": {"opcode": "INVOKEDYNAMIC", "name": "intfMethod", "descriptor": "()LBoo;", "bootstrap method": "STATIC Phoo::phee", "arguments": ["bootstrap argument 1", "bootstrap argument 2"]},
+ "11": {"opcode": "RETURN"},
+ "//stack map frame @12": {"locals": ["Foo", "int", "java/lang/Throwable"], "stack": ["Phee"]},
+ "//try block 1 end": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
+ "//exception handler 1 start": {"start": 0, "end": 12, "handler": 12, "catch type": "Phee"},
+ "12": {"opcode": "ATHROW"},
"exception handlers": {
- "handler 1": {"start": 0, "end": 7, "handler": 7, "type": "Phee"}}}}]}
+ "handler 1": {"start": 0, "end": 12, "handler": 12, "type": "Phee"}}}}]}
""");
}
@@ -560,7 +607,7 @@ class ClassPrinterTest {
"flags": ["PUBLIC"],
"superclass": "Boo",
"interfaces": ["Phee", "Phoo"],
- "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses"],
+ "attributes": ["SourceFile", "InnerClasses", "EnclosingMethod", "Synthetic", "Signature", "Deprecated", "NestHost", "NestMembers", "Record", "RuntimeInvisibleAnnotations", "PermittedSubclasses", "BootstrapMethods"],
"fields": [
{ "field name": "f",
"flags": ["PRIVATE"],
@@ -587,7 +634,7 @@ class ClassPrinterTest {
PUBLIC
Boo
PheePhoo
- SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclasses
+ SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclassesBootstrapMethods
<_1>Utf8Foo
<_2>Class1Foo
@@ -599,68 +646,81 @@ class ClassPrinterTest {
<_8>Utf8(ZLjava/lang/Throwable;)Ljava/lang/Void;
<_9>Utf8variable
<_10>Utf8LPhoo;
- <_11>Utf8Phee
- <_12>Class11Phee
- <_13>Utf8Phoo
- <_14>Class13Phoo
- <_15>Utf8RuntimeVisibleAnnotations
- <_16>Utf8flfl
- <_17>Float0.0
- <_18>Utf8frfl
- <_19>Float1.0
- <_20>Utf8AnnotationDefault
- <_21>Integer1
- <_22>Integer12
- <_23>Integer99
- <_24>Utf8LPhee;
- <_25>Double1.3
- <_27>Utf8LBoo;
- <_28>Utf8BOO
- <_29>Float3.7
- <_30>Integer33
- <_31>Long3333
- <_33>Integer25
- <_34>Utf8param
- <_35>Integer3
- <_36>Utf8RuntimeVisibleParameterAnnotations
- <_37>Float22.0
- <_38>Float11.0
- <_39>Utf8RuntimeInvisibleParameterAnnotations
- <_40>Float-22.0
- <_41>Float-11.0
- <_42>Utf8Exceptions
- <_43>Utf8Bee
- <_44>Class43Bee
- <_45>Utf8Code
- <_46>Utf8RuntimeInvisibleTypeAnnotations
- <_47>Utf8RuntimeVisibleTypeAnnotations
- <_48>Utf8LFee;
- <_49>Utf8yes
- <_50>Integer0
- <_51>Utf8LocalVariableTable
- <_52>Utf8LocalVariableTypeTable
- <_53>Utf8LineNumberTable
- <_54>Utf8StackMapTable
- <_55>Utf8SourceFile
- <_56>Utf8Foo.java
- <_57>Utf8InnerClasses
- <_58>Utf8InnerName
- <_59>Utf8EnclosingMethod
- <_60>Utf8enclosingMethod
- <_61>Utf8(Ljava/util/Collection;)Ljava/lang/Double;
- <_62>NameAndType6061enclosingMethod(Ljava/util/Collection;)Ljava/lang/Double;
- <_63>Utf8Synthetic
- <_64>Utf8Signature
- <_65>Utf8LBoo;LPhee;LPhoo;
- <_66>Utf8Deprecated
- <_67>Utf8NestHost
- <_68>Utf8NestMembers
- <_69>Utf8Record
- <_70>Utf8fee
- <_71>Utf8RuntimeInvisibleAnnotations
- <_72>Float2.0
- <_73>Float3.0
- <_74>Utf8PermittedSubclasses
+ <_11>Utf8Phoo
+ <_12>Class11Phoo
+ <_13>Utf8phee
+ <_14>Utf8()LBoo;
+ <_15>NameAndType1314phee()LBoo;
+ <_16>Methodref1215Phoophee()LBoo;
+ <_17>MethodHandleSTATIC16Phoophee()LBoo;
+ <_18>Utf8bootstrap argument 1
+ <_19>String18bootstrap argument 1
+ <_20>Utf8bootstrap argument 2
+ <_21>String20bootstrap argument 2
+ <_22>Utf8intfMethod
+ <_23>NameAndType2214intfMethod()LBoo;
+ <_24>InvokeDynamic17192123intfMethod()LBoo;
+ <_25>Utf8Phee
+ <_26>Class25Phee
+ <_27>Utf8RuntimeVisibleAnnotations
+ <_28>Utf8flfl
+ <_29>Float0.0
+ <_30>Utf8frfl
+ <_31>Float1.0
+ <_32>Utf8AnnotationDefault
+ <_33>Integer1
+ <_34>Integer12
+ <_35>Integer99
+ <_36>Utf8LPhee;
+ <_37>Double1.3
+ <_39>Utf8LBoo;
+ <_40>Utf8BOO
+ <_41>Float3.7
+ <_42>Integer33
+ <_43>Long3333
+ <_45>Integer25
+ <_46>Utf8param
+ <_47>Integer3
+ <_48>Utf8RuntimeVisibleParameterAnnotations
+ <_49>Float22.0
+ <_50>Float11.0
+ <_51>Utf8RuntimeInvisibleParameterAnnotations
+ <_52>Float-22.0
+ <_53>Float-11.0
+ <_54>Utf8Exceptions
+ <_55>Utf8Bee
+ <_56>Class55Bee
+ <_57>Utf8Code
+ <_58>Utf8RuntimeInvisibleTypeAnnotations
+ <_59>Utf8RuntimeVisibleTypeAnnotations
+ <_60>Utf8LFee;
+ <_61>Utf8yes
+ <_62>Integer0
+ <_63>Utf8LocalVariableTable
+ <_64>Utf8LocalVariableTypeTable
+ <_65>Utf8LineNumberTable
+ <_66>Utf8StackMapTable
+ <_67>Utf8SourceFile
+ <_68>Utf8Foo.java
+ <_69>Utf8InnerClasses
+ <_70>Utf8InnerName
+ <_71>Utf8EnclosingMethod
+ <_72>Utf8enclosingMethod
+ <_73>Utf8(Ljava/util/Collection;)Ljava/lang/Double;
+ <_74>NameAndType7273enclosingMethod(Ljava/util/Collection;)Ljava/lang/Double;
+ <_75>Utf8Synthetic
+ <_76>Utf8Signature
+ <_77>Utf8LBoo;LPhee;LPhoo;
+ <_78>Utf8Deprecated
+ <_79>Utf8NestHost
+ <_80>Utf8NestMembers
+ <_81>Utf8Record
+ <_82>Utf8fee
+ <_83>Utf8RuntimeInvisibleAnnotations
+ <_84>Float2.0
+ <_85>Float3.0
+ <_86>Utf8PermittedSubclasses
+ <_87>Utf8BootstrapMethods
Foo.java
PheePhooInnerNamePROTECTED
@@ -680,6 +740,8 @@ class ClassPrinterTest {
LPhoo;flfl2.0frfl3.0
BooPhoo
+
+ 0STATICPhoopheebootstrap argument 1bootstrap argument 2
f
@@ -705,35 +767,36 @@ class ClassPrinterTest {
3
RuntimeInvisibleTypeAnnotationsRuntimeVisibleTypeAnnotationsLocalVariableTableLocalVariableTypeTableLineNumberTableStackMapTable
- <_1>072variableLPhoo;
+ <_1>0122variableLPhoo;
- <_1>072variableLPhoo;
+ <_1>0122variableLPhoo;
<_1>01
<_2>12
<_3>63
- <_4>74
+ <_4>124
<_6>- Foo
- int
- java/lang/Throwable
- <_7>- Foo
- int
- java/lang/Throwable
- Phee
+ <_12>- Foo
- int
- java/lang/Throwable
- Phee
LBoo;FIELD
LFee;FIELDyesfalse
<__stack_map_frame__0>- Foo
- int
- java/lang/Throwable
- <__try_block_1_start>077Phee
+ <__try_block_1_start>01212Phee
<_0>ILOAD_11
<_1>IFEQ6
<_4>ALOAD_22LPhoo;variable
<_5>ATHROW
<__stack_map_frame__6>- Foo
- int
- java/lang/Throwable
- <_6>RETURN
- <__stack_map_frame__7>- Foo
- int
- java/lang/Throwable
- Phee
- <__try_block_1_end>077Phee
- <__exception_handler_1_start>077Phee
- <_7>ATHROW
+ <_6>INVOKEDYNAMICintfMethod()LBoo;STATIC Phoo::pheebootstrap argument 1bootstrap argument 2
+ <_11>RETURN
+ <__stack_map_frame__12>- Foo
- int
- java/lang/Throwable
- Phee
+ <__try_block_1_end>01212Phee
+ <__exception_handler_1_start>01212Phee
+ <_12>ATHROW
- 077Phee
+ 01212Phee
""");
}
@@ -750,10 +813,12 @@ class ClassPrinterTest {
PUBLIC
Boo
PheePhoo
- SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclasses
+ SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclassesBootstrapMethods
Phee
PhooBooBee
BooPhoo
+
+ 0STATICPhoopheebootstrap argument 1bootstrap argument 2
f
@@ -772,21 +837,22 @@ class ClassPrinterTest {
RuntimeInvisibleTypeAnnotationsRuntimeVisibleTypeAnnotationsLocalVariableTableLocalVariableTypeTableLineNumberTableStackMapTable
<_6>- Foo
- int
- java/lang/Throwable
- <_7>- Foo
- int
- java/lang/Throwable
- Phee
+ <_12>- Foo
- int
- java/lang/Throwable
- Phee
<__stack_map_frame__0>- Foo
- int
- java/lang/Throwable
- <__try_block_1_start>077Phee
+ <__try_block_1_start>01212Phee
<_0>ILOAD_11
<_1>IFEQ6
<_4>ALOAD_22
<_5>ATHROW
<__stack_map_frame__6>- Foo
- int
- java/lang/Throwable
- <_6>RETURN
- <__stack_map_frame__7>- Foo
- int
- java/lang/Throwable
- Phee
- <__try_block_1_end>077Phee
- <__exception_handler_1_start>077Phee
- <_7>ATHROW
+ <_6>INVOKEDYNAMICintfMethod()LBoo;STATIC Phoo::pheebootstrap argument 1bootstrap argument 2
+ <_11>RETURN
+ <__stack_map_frame__12>- Foo
- int
- java/lang/Throwable
- Phee
+ <__try_block_1_end>01212Phee
+ <__exception_handler_1_start>01212Phee
+ <_12>ATHROW
- 077Phee
+ 01212Phee
""");
}
@@ -803,7 +869,7 @@ class ClassPrinterTest {
PUBLIC
Boo
PheePhoo
- SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclasses
+ SourceFileInnerClassesEnclosingMethodSyntheticSignatureDeprecatedNestHostNestMembersRecordRuntimeInvisibleAnnotationsPermittedSubclassesBootstrapMethods
f
@@ -822,19 +888,19 @@ class ClassPrinterTest {
@Test
void testWalkTraceAll() throws IOException {
var node = ClassPrinter.toTree(getClassModel(), ClassPrinter.Verbosity.TRACE_ALL);
- assertEquals(node.walk().count(), 509);
+ assertEquals(node.walk().count(), 588);
}
@Test
void testWalkCriticalAttributes() throws IOException {
var node = ClassPrinter.toTree(getClassModel(), ClassPrinter.Verbosity.CRITICAL_ATTRIBUTES);
- assertEquals(node.walk().count(), 128);
+ assertEquals(node.walk().count(), 146);
}
@Test
void testWalkMembersOnly() throws IOException {
var node = ClassPrinter.toTree(getClassModel(), ClassPrinter.Verbosity.MEMBERS_ONLY);
- assertEquals(node.walk().count(), 41);
+ assertEquals(node.walk().count(), 42);
}
private static void assertOut(StringBuilder out, String expected) {