소스 검색

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);
                 }