Scala 2.8: use Java annotation with an array parameter -


I'm trying to implement the Java Section Bean with Scala 2.8.
Because this is a remote session bean, I have to comment with the following reply annotation:

  @Target ({ElementType.TYPE}) @ Reset (retention policy. RUNTIME ) Public @interface remote {class [] value () default {}; }  

I only got to Scala 2.7 In Scala 2.7, it is possible to define session bean in such a way:

  @Remote {val value = Array (classOf [MyEJBRemote]) class MyEJB ...  

How can I use annotations like Scala 2.8? I have already tried several different versions, as a result of which "the annotation logic should be a constant", "invalid introduction of simple expression" does not work in all these definitions:

   < / Div> 

give you your answer The problem is that instead of @Remote annotation class instead of class & lt ;? & Gt; . The raw type of Java is an unfortunate result of the previous compatibility barriers from Java 1.4 to Java 1.5, and scala compiler is a common source of bugs.

I found that the bug basically describes the same problem, and your particular problem

The only solution is to get source code from problematic annotation, class Compile it to class


Comments