title: Prepare parameter for super constructor
body: <p>I have a base class that have to be constructed with parameter. In child class I need to prepare this parameter before constructing base class but in Java super must be called before anything else. What's the best way to handle this situation (see simple example below).</p>
  
  <pre><code>class BaseClass {
      protected String preparedParam;
  
      public BaseClass(String preparedParam) {
          this.param = param;
      }
  }
  
  class ChildClass {
  
      public ChildClass (Map&lt;String, Object&gt; params) {
          // need to work with params and prepare param for super constructor
          super(param);
      }
  }
  </code></pre>