private <T>Constructor<T> findFromStringConstructor(Class<T> cls){
  Constructor<T> con;
  try {
    con=cls.getDeclaredConstructor(String.class);
  }
 catch (  NoSuchMethodException ex) {
    try {
      con=cls.getDeclaredConstructor(CharSequence.class);
    }
 catch (    NoSuchMethodException ex2) {
      return null;
    }
  }
  FromString fromString=con.getAnnotation(FromString.class);
  return fromString != null ? con : null;
}

private < T > Constructor < T > findFromStringConstructor ( Class < T > cls ) { Constructor < T > con ; try { con = cls . getDeclaredConstructor ( String . class ) ; } catch ( NoSuchMethodException ex ) { try { con = cls . getDeclaredConstructor ( CharSequence . class ) ; } catch ( NoSuchMethodException ex2 ) { return null ; } } FromString fromString = con . getAnnotation ( FromString . class ) ; return fromString != null ? con : null ; }
finds the conversion method .
