title: Create API jar like Android does with stubbed methods?
body: <p>I'm looking to distribute a custom API and know the classes will be available at run time. I would like my public and protected methods / classes to be included in a jar I can distribute but I don't want any other source code and I would like to throw an exception if that jars code is actually executed.</p>
  
  <p>This is the exact behaviour the Android framework jar has when you attempt to execute the jar directly.</p>
  
  <p>My question is how to I create the same jar from my source without manually going through and creating each stubbed method. I would like this to scale as my API grows.</p>