If you already have Guava on the classpath, this is a bit more robust as you specify the interface/superclass by type rather than index.
TypeToken> baz = TypeToken.of(Bar.class).resolveType(Foo.class.getTypeParameters()[0]);
System.out.println(baz.getRawType()); // class Baz