Gibt es eine Möglichkeit, eine Interceptor-Qualifikationsmerkmal-Annotation zu erstellen, die den Annotationstring-Wert für die Qualifizierung ignoriert?Interceptor-Qualifikationsmerkmal erstellen, das Annotationswert ignoriert()
zum Beispiel:
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) {
...
}
Das funktioniert nicht, weil die Annotation value("message for this log")
als Qualifier funktioniert, aber ich möchte die value()
nicht als Qualifier verwenden, aber Meldungslog.