title: Android Studio - Implement Methods and parameter names
body: <p>Java compiler does not preserve parameter names for any interface, unless newer compiler option -parameter is used (I am not sure how to use it with android studio) - refer example below.  </p>
  
  <p>Since java compiler does not preserve parameters names,  Android Studio "code -> implement methods" is not able to generate code with original parameter names. </p>
  
  <p>The question is, how to implement a library module so that Android Studio Menu, Code->Implement Methods correctly generates code with all the original parameter names. </p>
  
  <p>For example, following is a simple class and an interface. This class is in a separate aar module. When application uses this AAR, implements TablaListener and asks AndroidStudio to generate interface methods stubs, the parameter names are not preserved. </p>
  
  <p>Please note that proguard is NOT used. </p>
  
  <p>Any ideas?</p>
  
  <pre><code>public class TablaCore {
  
      public interface TablaListener {
          /**
           * @param params
           * @param data
           * @return
           */
          boolean TablaCore_onAction(String params, byte[] data);
      }
  
      private static TablaListener mListener = null;
      public static void setListener(TablaListener myListener) {
          mListener = myListener;
      }
  
      public TablaListener getListener() {
          return mListener;
      }
  
  }
  </code></pre>
  
  <p>It is easy to demonstrate by compiling and decompiling above class. This is decompiled version</p>
  
  <pre><code>public class TablaCore
  {
    private static TablaListener mListener = null;
  
    public static void setListener(TablaListener myListener)
    {
      mListener = myListener;
    }
  
    public TablaListener getListener()
    {
      return mListener;
    }
  
    public static abstract interface TablaListener
    {
      public abstract boolean TablaCore_onAction(String paramMessageParams, byte[] paramArrayOfByte);
  
    }
  }
  </code></pre>