Added generics support to shadowOf methods and @RealObjects

Also added `@SuppressWarnings` directives into the generated Shadows file so as to silence all of the deprecation & unchecked casting warnings as these are ok and nothing can be done about then.