Jay Taylor's notes
back to listing indexScala classOf for type parameter - Stack Overflow
[web search]
Original source (stackoverflow.com)
Clipped on: 2012-09-25
I am trying to create a generic method for object updates using scala / java but I can't get the class for a type parameter. Here is my code:
The error i get is
I know in java you can't do it but is this possible in scala at all? Thanks! | |||||||||
| |||||||||
Yes, you can do that using manifests:
| |||||||||||||||||||||||||||||||||
|
Your Answer
community wiki