Its not possible to do this the way you indicate (well, it would be possible wih dynamic class generation and compilation, but that's a little bit too complex...)
Instead, you can define the objcet to be of type "Object" (or, more likely, some known superclass or interface), and then use Class.forName(<some name>
.newInstance();
Since you need to know the methods at compile time, you have to know the class (or superclass/interface) at compile time, but the actual class can be determined at runtime as shown above.
Just be sure to handle ClassNotFound or ClassCast exceptions.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.