title: How to convert from String to specific types using PropertyEditor
body: <p>I am trying to pass any class type besides a java.lang primitive types such as java.math (e.g., java.math.BigInteger) types and customized build in types (e.g., com.parse.MyOwnType).  The method below only does for primitive types.  Anyone has a suggestion on how to use PropertyEditor besides primitive types? Are there other editor libraries that can be used for conversion?</p>
  
  <pre><code>import java.beans.PropertyEditor;
  import java.beans.PropertyEditorManager;
  
  private Object convert(Class&lt;?&gt; targetType, String text) {
      PropertyEditor editor = PropertyEditorManager.findEditor(targetType);
      editor.setAsText(text);
      return editor.getValue();
  }
  </code></pre>