为什么日食产生的参数名按照arg0,ARG1,ARG2 ....对方法呢? [英] Why eclipse is generating argument names as arg0,arg1,arg2.... for methods?

查看:144
本文介绍了为什么日食产生的参数名按照arg0,ARG1,ARG2 ....对方法呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试访问一些类的方法;日食获取方法,但论点方法内由为arg0,ARG1,ARG2 ...

When I try to access some class's method; eclipse gets that method but arguments inside that method are replaced by arg0, arg1, arg2...

例如: -

假设我有一个名为ReadFile.java某类这种方法

Suppose I have this method in some class named ReadFile.java

@Override
public int readXXX(int start, int end, String xxx) throws IOException {
    return 0;
}

当我尝试从类的实例,它显示我访问方法如下:

When I try to access that method from an instance of class it shows me as follows:

readFile.readXXX(arg0, arg1, arg2);

它变得难以确定什么,我应该传递参数。同样的事情也会发生的Java方法。也就是说,当我实现接口的所有方法下将生成,但在方法的参数是为arg0,ARG1 .....

It becomes hard to identify what I should pass in argument. The same thing also happens for java methods. i.e. when I implement interface all method under that will be generated but arguments in that methods are arg0, arg1.....

有没有设定我可以做prevent呢?

Is there any setting I can do prevent this?

我使用Eclipse Galelio。

I'm using Eclipse Galelio.

推荐答案

Eclipse中不能工作的参数,因为它无法找到来源或javadoc的附件。

Eclipse can't work out the arguments because it can't find the source or javadoc attachments.

请确保您的源连接。

要检查,单击方法调用的readXXX 和preSS F3应该会打开方法声明。如果源未连接时,Eclipse会说找不到源代码,将让你附加源...。

To check, click on the method call readXXX and press F3 which should open the method declaration. If the source is not attached, Eclipse will say "Source not found" and will allow you to "Attach Source...".

这篇关于为什么日食产生的参数名按照arg0,ARG1,ARG2 ....对方法呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆