¿Cómo convertir "dinámicamente" una instancia de tipo de objeto en su tipo de datos específico?

public Object foo(int opt){
  if (opt == 0) return new String();
  else if (opt == 1) return new Integer(1);
  else if (opt == 2) return new Double(1);
  else if ...
  .. and many more
}

public void doSomething(String s){..}
public void doSomething(Integer i){..}
public void doSomething(Double d){..}
... and many more doSomething method

public static void main(String[] args){
  ...
  Object o = foo(x); //x is a value obtained during runtime, e.g. from user input

  //now I want to call doSomething method
  // (1)
  if (o instanceof String) doSomething((String) o);
  else if (o instanceof Integer) doSomething((Integer) o);
  else if (o instanceof Double) doSomething((Double) o);
  ...
  // (2)
}

¿Hay alguna forma mejor de simplificar las declaraciones encerradas por (1) ... (2)?
¿Ayuda Java Reflection?

Respuestas a la pregunta(5)

Su respuesta a la pregunta