java.lang.class

Java: .class file and java.lang.Class

Is java.lang.Class the same as the actual .class file? i.e. is the content equivalent? I want to send the .class over socket, and was wondering if instead of trying to find and load the actual .class file, if I could just transmit the java.lang.Class instead? Elaboration (read if you want more info) Suppose I have a Java class called ...

Java: Subclassing a genericised class

Hi, I have a genericised class that I wish to subclass as follows: public class SomeTable<T extends BaseTableEntry> extends BaseTable<T> { public SomeTable(int rows, int cols) { super(rows, cols, SomeTableEntry.class); //Does not compile: //Cannot find symbol: constructor BaseTable(int, int, java.la...

Is classOf[] in Scala 2.8 different from 2.7?

I have an interface from Java public class IJava { ... public java.lang.Class getType(); ... } It is inherited in Scala class CScala { def getType() = classOf[Foo] } It worked in Scala 2.7.7. But in 2.8.0.RC1, I get type mismatch; found : java.lang.Class[Foo](classOf[Foo]) required: java.lang.Class How do I get...