Is there a way to create an interceptor classifier annotation that ignores the value of the annotation string for qualification?
eg:
Log.java
@Inherited
@InterceptorBinding
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Log {
String value() default "";
}
LogInterceptor.java
@Log
@Interceptor
public class LogInterceptor implements Serializable {
...
}
Usage.java
@Log("message for this log")
public String interceptedMethod(String param) {
...
}
This does not work, because the annotation value("message for this log")works as a qualifier, but I want to use value()not a qualifier, but a message log.
source
share