title: How do I get something like an anonymous inner class in Groovy?
body: <p>How do I define an anonymous inner class in Groovy? I saw references that they were supposed to be supported in Groovy 1.7 and I'm using 1.8.</p>
  
  <pre><code> thread = process.consumeProcessOutput(
     new Appendable() {
       Appendable append(char c) {
         app1.append(c)
         app2.append(c)
         return this
       }
  
       Appendable append(CharSequence csq) {
         app1.append(csq)
         app2.append(csq)
         return this
       }
  
       Appendable append(CharSequence csq, int start, int end) {
         app1.append(csq, start, end)
         app2.append(csq, start, end)
         return this
       }
     })
  </code></pre>
  
  <p>I get an exception with this code:</p>
  
  <pre><code>Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.UNIXProcess.consumeProcessOutput() is applicable for argument types: (MyClass$1) values: [MyClass$1@19c8ef56]
  </code></pre>