title: Compiling String as Code during Runtime on Android
body: <p>I have tried using things on Janino on Android and have concluded that they simply do not work within the Dalvik VM.</p>
  
  <p>So Im just going to ask a simple question: On <strong>Android</strong>,Is it possible to compile a string containing code during runtime for use within the app. If so, are there any libraries that let me do so and/or can you share a code example of how to do it?</p>
  
  <p>For <em>(a very simple)</em> example, If I had a String object containing the following:</p>
  
  <pre><code>public class Adder{
  
       int x;
       int y;
  
       public Adder(int x,int y) {
       this.x = x;
       this.y = y;
       }
  
       public int add() { return x+y;}
  
  }
  </code></pre>
  
  <p>As one giant line of string. Is there a way I can process it to create an instance of an Adder object so I can call the <code>add()</code> method, say, via the Reflection API? </p>
  
  <p><strong>Edit</strong>
  I've tried beanshell interpretation but it proved to be too slow. Im looking for something a little faster, just like Janino</p>