Menu

-keepparameternames not working for library

Help
javaten10
2014-02-07
2014-02-10
  • javaten10

    javaten10 - 2014-02-07

    I followed the example for a typical library, the configuration has -keepparameternames. But the method signature parameter names are not kept. For example, in eclipse, an class implementing an interface,
    eclipse will add all methods of the interface by CTRL+1. But the added method parameter names are obfuscated, like arg0, arg1.

    Thanks for help.
    David

     
  • Wanderer

    Wanderer - 2014-02-10

    To auto-complete parameter names, your favorite IDE needs source files for all libraries you're using. Just the compiled code is not sufficient, because parameter names don't exist there directly. This is true for Intellij IDEA, but probably also true for Eclipse.

     
  • javaten10

    javaten10 - 2014-02-10

    If this is the case, the option -keepparameternames will not be useful. Parameter names are for IDE. Users will get unfriendly experience with parameter names arg0, arg1. But our source code is not distributed.

    Thanks,
    Dave

     

    Last edit: javaten10 2014-02-10
  • Eric Lafortune

    Eric Lafortune - 2014-02-10

    Some IDEs at least used to be able to extract parameter names from compiled code, but I haven't checked the status recently. The parameter names are optionally present as debug information (as part of the attribute LocalVariableNames).

    Eric