Is there a way to create a interceptor qualifier annotation that ignores the annotation string value for qualifying?
for example:
Log.java
@Inherited
@InterceptorBinding
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Log {
String value() default ""; // <---- ignore this
}
LogInterceptor.java
@Log
@Interceptor
public class LogInterceptor implements Serializable {
...
}
Usage.java
@Log("message for this log")
public String interceptedMethod(String param) {
...
}
This doesn't work because the annotation value("message for this log")
works as qualifier but I want to use the value()
not as qualifier, but message log.