package lock;
public class ByteCodeTest {
private volatile String name="view";
public void work(){
name+="hello";
}
}
// class version 56.0 (56)
// access flags 0x21
public class lock/ByteCodeTest {
// compiled from: ByteCodeTest.java
// access flags 0x19
public final static INNERCLASS java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup
// access flags 0x42
private volatile Ljava/lang/String; name
// access flags 0x1
public <init>()V
L0
LINENUMBER 3 L0
ALOAD 0
INVOKESPECIAL java/lang/Object.<init> ()V
L1
LINENUMBER 4 L1
ALOAD 0
LDC "view"
PUTFIELD lock/ByteCodeTest.name : Ljava/lang/String;
RETURN
L2
LOCALVARIABLE this Llock/ByteCodeTest; L0 L2 0
MAXSTACK = 2
MAXLOCALS = 1
// access flags 0x1
public work()V
L0
LINENUMBER 6 L0
ALOAD 0
DUP
GETFIELD lock/ByteCodeTest.name : Ljava/lang/String;
INVOKEDYNAMIC makeConcatWithConstants(Ljava/lang/String;)Ljava/lang/String; [
// handle kind 0x6 : INVOKESTATIC
java/lang/invoke/StringConcatFactory.makeConcatWithConstants(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;
// arguments:
"\u0001hello"
]
PUTFIELD lock/ByteCodeTest.name : Ljava/lang/String;
L1
LINENUMBER 7 L1
RETURN
L2
LOCALVARIABLE this Llock/ByteCodeTest; L0 L2 0
MAXSTACK = 2
MAXLOCALS = 1
}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.