title: SWIG : How to rename generated Java code according to a regex?
body: <p>I'm using Swig for generating Java code from C/C++ code.</p>
  
  <p>I get many classes un-human readable, kind of " SWIG_p_f_p_........", and so long.</p>
  
  <p>However, I need my final generated classes to respect some naming rules.</p>
  
  <p>For example :</p>
  
  <p><strong>SWIG_p_f_p_</strong> should be deleted and replaced by something kind of <strong>PointerOn...</strong>.</p>
  
  <p>Also, in the C++ code there is a suffix ( not generated by SWIG ) which is <strong>FFE_</strong> used for many methods and I need to delete it.</p>
  
  <p>I find in the documentation of SWIG that there is this example of renaming and using regex :</p>
  
  <pre><code>%rename("%(regex:/^([A-Z][a-z]+)+_(.*)/\\2/)s", %$isenumitem) "";
  </code></pre>
  
  <p>But I don't know really how to adapt it in my case.</p>
  
  <p>Moreover, having the content of my interface (*.i ) this way :</p>
  
  <pre><code>%module FfeFooJava
  %{
  #include "foo.h"
  }
  // some typemaps here that use some C++ classes and C structures having suffix FFE
  //.....
  
  %include "foo.h"
  </code></pre>
  
  <p>Where can I add the renaming instructions??</p>
  
  <p><strong>Remark :</strong></p>
  
  <p>I tried this instruction :</p>
  
  <pre><code>%rename("%(regex:/^(FFE_)(.*)/\\2/)s") "";
  </code></pre>
  
  <p>And it changed even some strings values. For example the string <strong>"FFE_OK"</strong> has become <strong>"OK"</strong>. And so I wonder if it is possible to apply naming rules on C++ classes or structures or other, something which would help me exclude strings modification.</p>
  
  <p>Thank you a lot!</p>