private static Object selfConvert(String parsingMethod,String value,Class<? extends Object> type){
  try {
    Method method=type.getMethod(parsingMethod,String.class);
    return method.invoke(null,value);
  }
 catch (  InvocationTargetException e) {
    LOG.error(LOG_ERROR,e);
    throw new IllegalArgumentException("Can't convert " + value + " to "+ type.getName(),e.getCause());
  }
catch (  IllegalAccessException e) {
    LOG.error(LOG_ERROR,e);
    throw new IllegalArgumentException("Can't convert " + value + " to "+ type.getName(),e);
  }
catch (  NoSuchMethodException e) {
    LOG.error(LOG_ERROR,e);
    throw new IllegalArgumentException("Can't convert " + value + " to "+ type.getName(),e);
  }
}

private static Object selfConvert ( String parsingMethod , String value , Class < ? extends Object > type ) { try { Method method = type . getMethod ( parsingMethod , String . class ) ; return method . invoke ( null , value ) ; } catch ( InvocationTargetException e ) { LOG . error ( LOG_ERROR , e ) ; throw new IllegalArgumentException ( "Can't convert " + value + " to " + type . getName ( ) , e . getCause ( ) ) ; } catch ( IllegalAccessException e ) { LOG . error ( LOG_ERROR , e ) ; throw new IllegalArgumentException ( "Can't convert " + value + " to " + type . getName ( ) , e ) ; } catch ( NoSuchMethodException e ) { LOG . error ( LOG_ERROR , e ) ; throw new IllegalArgumentException ( "Can't convert " + value + " to " + type . getName ( ) , e ) ; } }
selfconversion implies that if a class has the given static method named that receive a string and that returns a instance of the class , then it can serve for conversion purpose .
