/**
   * Helper method for {@link #parse(StaplerRequest, Annotation, Class, String)} to convert to the
   * right type from String.
   */
  protected final Object convert(Class targetType, String value) {
    Converter converter = Stapler.lookupConverter(targetType);
    if (converter == null) throw new IllegalArgumentException("Unable to convert to " + targetType);

    return converter.convert(targetType, value);
  }