gpt4 book ai didi

java - 无法解析方法 'access$000()'

转载 作者:搜寻专家 更新时间:2023-10-31 19:41:32 25 4
gpt4 key购买 nike

我无权访问 java 源代码,我已经从 jar 文件创建了 java 代码。我需要修改其中一个 java 文件以添加一些附加功能,它提示一个内部类方法

return Survey.access$000();

它说无法解析方法 'access$000()'我应该怎么做才能摆脱这个错误到目前为止,在我对 jar 文件进行逆向工程后,我还没有修改任何东西。有问题的类是 Survey,它有以下内部类

private static class SurveyPermissionCatalogFinder
/* */ implements PermissionCatalogFinder
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private static SurveyPermissionCatalogFinder one;
/* */
/* */ public PermissionCatalog getCatalog()
/* */ {
/* 225 */ return Survey.access$000();
/* */ }
/* */ public static SurveyPermissionCatalogFinder getInstance() {
/* 228 */ if (one == null) {
/* 229 */ one = new SurveyPermissionCatalogFinder();
/* */ }
/* 231 */ return one;
/* */ }

最佳答案

看起来最初在内部类中访问了一些私有(private)变量。除了您不能总是期望反编译的类是有效的 Java 源代码之外,不能说您应该如何处理它。

请查看下面的问题,了解神秘的 access$000() 方法的解释。

关于java - 无法解析方法 'access$000()',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6270302/

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