Can not apply Produces @annotation to class:
Java File 1:
package javax.ws.rs;
@java.lang.annotation.Inherited
@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD})
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
public @interface Produces {
java.lang.String[] value() default {"*/*"};
}
Java File 2:
@Produces( { MediaType.APPLICATION_JSON, "text/json" })
abstract class Entity ....
Kotlin File :
class Customer : Entity …
For now it will throw Exception:
java.lang.ClassCastException: com.intellij.psi.impl.compiled.ClsArrayInitializerMemberValueImpl cannot be cast to com.intellij.psi.PsiLiteralExpression
at org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver.resolveAnnotation(JavaDescriptorResolver.java:1621)
at org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver.resolveAnnotations(JavaDescriptorResolver.java:1591)
at org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver.createJavaClassDescriptor(JavaDescriptorResolver.java:387)
at org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver.resolveClass(JavaDescriptorResolver.java:368)
at org.jetbrains.jet.lang.resolve.java.JavaPackageScope.getClassifier(JavaPackageScope.java:56)
at org.jetbrains.jet.lang.resolve.scopes.WritableScopeWithImports.getClassifier(WritableScopeWithImports.java:171)
Outersky