为什么 eclipse 为方法生成参数名称为 arg0,arg1,arg2....

编程入门 行业动态 更新时间:2024-10-25 14:30:12
本文介绍了为什么 eclipse 为方法生成参数名称为 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...

Example:-

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);

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.....

Is there any setting I can do prevent this?

I'm using Eclipse Galelio.

解决方案

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

Make sure your source is attached.

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...".

更多推荐

为什么 eclipse 为方法生成参数名称为 arg0,arg1,arg2....

本文发布于:2023-11-24 03:39:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623840.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   方法   eclipse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!