For interoperability with a Java library, I need to get an instance of the
case class Foo(name: String, colour: String, amount: Int)
val bar: Foo
There are a number of ways of getting a class value in Scala, using the predefined function
In your case (as noted by @Kolmar),
classOf[Foo] can be used to get the class of an uninstantiated object. Note that the output of this can be a bit confusing (from a worksheet):
classOf[Foo] = class A$A12$A$A12$Foo classOf[String] // class java.lang.String classOf[List[String]] // class scala.collection.immutable.List classOf[Array[String]] // class [Ljava.lang.String;
That latter one can be easy to confuse, given the slightly strange output syntax.