Albert451
Albert451

Reputation: 79

IntelliJ replaces method parameter names of interface

I am having problems with local variable names of methods that are in interface in program Intellij IDEA (look at screens below). Name of variables are "s1", "s2" instead of correct names that I have set in interface.

Interface class is in other .jar that is added in project structure's artifacts.

I completely do not know how to fix this problem.

How it looks in editor when I want to use method:

enter image description here

How it looks in interface:

enter image description here

How it looks in class that implements interface:

enter image description here

Upvotes: 2

Views: 803

Answers (1)

Kamil Janowski
Kamil Janowski

Reputation: 2025

You're importing this stuff from a compiled jar.

Classes, once compiled, don't really contain the original variable names any more. They don't store the javadocs either.

What you want to do is build a separate jar with javadocs only and import it into your project (if you use maven, it can be done with the following plugin: https://maven.apache.org/plugins/maven-javadoc-plugin/usage.html) or if you have access to the source code of your library, you can go to File > Project structure and add the reference to the source code.

Upvotes: 2

Related Questions