IntelliJ为什么显示奇怪的参数名称?

huangapple go评论59阅读模式
英文:

Why does Intellij display weird parameter names?

问题

我最近开始使用Java进行软件开发。也许是因为我的IntelliJ设置有问题,但大部分情况下参数的名称都很奇怪,像是 i,i1,i2,i3,i4,...。这种情况正常吗?还是我漏掉了什么?

示例 1

示例 2

英文:

I recently started using Java for software development. Maybe my Settings in IntelliJ are wrong, but most of the time the parameters have weird names like i, i1, i2, i3, i4, .... Is this normal or am I missing something?

Example 1

Example 2

答案1

得分: 1

当IntelliJ试图确定参数名称时,它会查看以下位置:

  • 源代码

    如果您将源代码添加到库文件中,它将使用源代码中的名称作为文档中的名称。

  • 构建的JAR文件

    在大多数情况下,构建的JAR文件包含有关参数名称的调试信息,但并非总是如此。

  • 随机生成的名称

    如果以上方法失败,它将生成随机的无意义名称,例如对于第一个数字参数,它可能生成i1之类的名称。

英文:

When IntelliJ tries to figure out the parameter names, it looks into the following places:

  • Source code

    If you added source code to a library file, it uses the names from the source code for the names in the documentation

  • Build jar file

    In most cases, the build jar file contains debug information about the parameter names, this is not always the case

  • Random generated names

    If the above fails, it will generate random meaningless names, like i1 for the first number parameter.

huangapple
  • 本文由 发表于 2020年5月5日 00:23:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/61596904.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定