Reputation: 2549
I have a Java class like:
public class User {
public String name;
public String email;
}
Instead of creating another case class in Scala or using tuple
, can I do something like
Form<User> form = Form.form(User.class)
The above code is possible in Play Java but not for Scala
Upvotes: 2
Views: 519
Reputation: 51109
.class
isn't a keyword in Scala. Try classOf[User]
.
i.e.
val form = Form.form(classOf[User])
Upvotes: 2