scala lib version: 2.8.0-SNAPSHOT (timestamp: 20091006.003811 buildNumber: 232)
I can't pass the class of an object to a (Java) annotation (for ex, this one: https://svn.apache.org/repos/asf/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java )
The Factory annotation expects a Factory implementation, which is just class with a static method "newInstance", and so is done in Scala with an object.
In Java, I write: @Factory( MyFactory.class )
In scala, @Factory( classOf[MyFactory] ) won't work as MyFactory is an object and @Factory( MyFactory.getClass ) doesn't compile due to the error:
"annotation argument needs to be a constant; found: MyFactory.getClass"
I don't see any other way to pass the object's class as the annotation parameter.