Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是斯卡拉的新手。我正在尝试创建类的引用。在java中我可以写
ContactFeed resultFeed = myService.getFeed(metafeedUrl, ContactFeed.class);
如何在scala中写相同的?
使用classOf,例如:
classOf
val resultFeed = myService.getFeed(metafeedUrl, classOf[ContactFeed])