title: Groovy with block in Java
body: <p>In groovy, there is a <code>with</code> block, which can be used to call methods on a object like this:</p>
  
  <pre><code>obj.with
  {
     method1()
     method2()
  }
  </code></pre>
  
  <p>where <code>method1,method2</code> are methods for object <code>obj</code>. </p>
  
  <p>Is the same is possible in Java 7? I mean can we make some way to do this in java?</p>
  
  <p>Thanks in advance.</p>