[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Support for @Repeatable annotations
|
Hi all,
apologies if this is a FAQ, my mailing list searches did not turn up any matches.
I’m experimenting with the @Repeatable annotations of Java 8 on some aspects, and apparently AspectJ does not provide any support for @Repeatable, as I get an exception at some point. (Below are the details of my setup and the offending annotation description.)
Am I correct that there is no support? Are there any plans to include it?
Thanks in advance!
AspectJ Compiler version: 1.8.3.20140820082000
Relevant stack trace (cutting out a ton of frames at the bottom as I’m doing the experiments in Clojure):
---
ERROR in (test-suite test-annotation-contents) (EclipseSourceType.java:820)
Uncaught exception, not in assertion.
expected: nil
actual: org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType$MissingImplementationException: Please raise an AspectJ bug. AspectJ does not know how to convert this annotation [@Repeatable(MultiRequires.class)]
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateAnnotation (EclipseSourceType.java:820)
org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.convertEclipseAnnotation (EclipseSourceType.java:718)
org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.getAnnotations (EclipseSourceType.java:698)
org.aspectj.weaver.ReferenceType.getAnnotations (ReferenceType.java:200)
sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:606)
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:313)
---
Source code of the annotation:
---
package damp.ekeko.aspectj.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Repeatable(MultiRequires.class)
public @interface Requires {
String aspect() default "";
String label() default "";
}
---
package damp.ekeko.aspectj.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
public @interface MultiRequires {
Requires[] value();
}
---
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry
PLEIAD lab - Computer Science Department (DCC) - University of Chile