title: Java: most efficient way of changing method arguments
body: <p>I have a problem. So, assume there is this class native to the JRE with 100+ methods:</p>
  
  <pre><code>class HundredMethods {
  
    public void method1(int) {
    }
  
    public void method2(int) {
    }
  
    ... (98 more methods)
  
  }
  </code></pre>
  
  <p>and I want to alter the arguments of 5 of those methods. <em>Specifically, integers to doubles.</em> <strong>and</strong> add an extra double argument<br>My current solution involves a wrapper class that:<br>-A: Provides direct access to the original class
  <br>-B: Has five methods that "translate" double arguments (with some extra inputs) into the integer arguments of the original. So:</p>
  
  <pre><code>class WrapperMethods{
     public HundredMethods original = (assigned at constructor)
  
     public void method1(double,double(extra)) {
       int i = (assigned a value in "code" below)
       this.original.method1(i);
     }
  }
  </code></pre>
  
  <p><strong>Is there another lightweight solution to both changing and adding arguments to a few methods in a "heavy" class besides the one above?</strong> In terms of actually implementing this solution in my code, I've found that it can get messy when a user doesn't know what methods the wrapper class changes. In fact, I have a roughly 250+ method class that I'm changing 25 methods of, so the bigger the class, the messier my code becomes. Considering that I want to publish my code as public, someone would have to look up what methods the wrapper changes every time they wanted to use the wrapper. </p>
  
  <p>Thanks!</p>