title: How to return a method from a String?
body: <pre><code>public AbstractImagePrototype getIcon(ModelData model) {
      if (model.get("icon") != null) {
          return Resources.ICONS.lock();
      } else {
          return null;
      }
  }   
  </code></pre>
  
  <p>in this line of code:</p>
  
  <pre><code>return Resources.ICONS.lock();
  </code></pre>
  
  <p>I need to change <code>lock()</code> for a String, e.g.</p>
  
  <pre><code>String text = "lock()";
  return Resources.ICONS.text;
  </code></pre>
  
  <p>How do I do this?</p>