Using the AWT.Transferable, I get an argument "data: Any" which is actually of type java.util.Arrays.ArrayList. How can I cast the "data" explicitly to this type? It seems I do not have any access to the "ArrayList"-Type itself...
2 Answers
Why do you need the class explicitly? Couldn't you use the java.util.List interface?
data.asInstanceOf[java.util.List[_]]
Note that casting is not encouraged, which is why it looks so awful in Scala!
1 Comment
hotzen
Ah, that did the trick. Should just have checked the interfaces of ArrayList... Thanks!