private Method findFromStringMethod(Class<?> cls,String methodName){
  Method m;
  try {
    m=cls.getMethod(methodName,String.class);
  }
 catch (  NoSuchMethodException ex) {
    try {
      m=cls.getMethod(methodName,CharSequence.class);
    }
 catch (    NoSuchMethodException ex2) {
      throw new IllegalArgumentException("Method not found",ex2);
    }
  }
  if (Modifier.isStatic(m.getModifiers()) == false) {
    throw new IllegalArgumentException("Method must be static: " + methodName);
  }
  return m;
}

private Method findFromStringMethod ( Class < ? > cls , String methodName ) { Method m ; try { m = cls . getMethod ( methodName , String . class ) ; } catch ( NoSuchMethodException ex ) { try { m = cls . getMethod ( methodName , CharSequence . class ) ; } catch ( NoSuchMethodException ex2 ) { throw new IllegalArgumentException ( "Method not found" , ex2 ) ; } } if ( Modifier . isStatic ( m . getModifiers ( ) ) == false ) { throw new IllegalArgumentException ( "Method must be static: " + methodName ) ; } return m ; }
finds the conversion method .
