boolean (ClassReader reader) { if (myClassFilterAnnotationRegexpList.isEmpty()) { return false; } final boolean[] result = {false}; reader.accept(new ClassVisitor(Opcodes.API_VERSION) { @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (!result[0]) { String internalName = Type.getType(desc).getInternalName(); for (Regexp regexp : myClassFilterAnnotationRegexpList) { if (regexp.matches(internalName)) { result[0] = true; break; } } } return null; } }, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES); return result[0]; }