Преглед на файлове

caPrefix清除指定注解支持前缀和正则匹配

(cherry picked from commit 9cb26c866a42f4d25de07291e180fbf30af6bb04)
wang преди 2 години
родител
ревизия
b1974b7df7
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/util/JavassistUtil.java

+ 1 - 1
class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/util/JavassistUtil.java

@@ -166,7 +166,7 @@ public final class JavassistUtil {
                     AnnotationsAttribute annotationsAttribute = (AnnotationsAttribute) y;
                     Annotation[] annotations = annotationsAttribute.getAnnotations();
                     Annotation[] newAnnotations = Arrays.stream(annotations)
-                            .filter(annotation -> !annotation.getTypeName().startsWith(x))
+                            .filter(annotation -> StrUtil.startsWithOrRegMatched(x,annotation.getTypeName()))
                             .toArray(Annotation[]::new);
                     annotationsAttribute.setAnnotations(newAnnotations);
                 }