gpt4 book ai didi

java - Java方法描述符中美元符号的含义?

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:42:23 25 4
gpt4 key购买 nike

例如,它是 Jikes RVM 堆栈的一部分。

at [0x70cfba90, 0x708cfaa4] Lorg/apache/lucene/index/SegmentInfos; 
**access$000**(Ljava/lang/String;)V
at [0x70cfbb04, 0x708b55c8] Lorg/apache/lucene/index/SegmentInfos$
FindSegmentsFile; run()Ljava/lang/Object; at line 554
at [0x70cfbb24, 0x708c4a8d] Lorg/apache/lucene/index/SegmentInfos;
read(Lorg/apache/lucene/store/Directory;)V at line 272

'access' 应该是一个方法名。但是我检查了类源代码及其接口(interface),那里没有名为“访问”的方法。我在谷歌上找不到答案,因为谷歌讨厌各种标点符号。有人可以帮忙吗?非常感谢。

最佳答案

引自article@birryree 链接:

A private member m of a class C may be used by another class D, if one class encloses the other, or if they are enclosed by a common class. Since the virtual machine does not know about this sort of grouping, the compiler creates a local protocol of access methods in C to allow D to read, write, or call the member m. These methods have names of the form access$0, access$1, etc. They are never public. Access methods are unique in that they may be added to enclosing classes, not just inner classes.

关于java - Java方法描述符中美元符号的含义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7578155/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com