@@ -0,0 +1,2572 @@
+package io.github.classgraph.issues.issue350;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Aimport java.lang.annotation.Retention;%0Aimport java.lang.annotation.RetentionPolicy;%0A%0Aimport org.junit.Test;%0A%0Aimport io.github.classgraph.ClassGraph;%0Aimport io.github.classgraph.ScanResult;%0A%0A/**%0A * Unit test.%0A */%0Apublic class Issue350 %7B%0A    /** */%0A    @Retention(RetentionPolicy.RUNTIME)%0A    public static @interface SuperclassAnnotation %7B%0A    %7D%0A%0A    /** */%0A    public static class Pub %7B%0A        /** */%0A        @SuperclassAnnotation%0A        public int annotatedPublicField;%0A%0A        /** */%0A        @SuperclassAnnotation%0A        public void annotatedPublicMethod() %7B%0A        %7D%0A    %7D%0A%0A    /** */%0A    public static class Priv %7B%0A        /** */%0A        @SuperclassAnnotation%0A        private int annotatedPrivateField;%0A%0A        /** */%0A        @SuperclassAnnotation%0A        private void annotatedPrivateMethod() %7B%0A        %7D%0A    %7D%0A%0A    /** */%0A    public static class PubSub extends Pub %7B%0A    %7D%0A%0A    /** */%0A    public static class PrivSub extends Priv %7B%0A    %7D%0A%0A    /** Test finding subclasses of classes with annotated methods or fields. */%0A    @Test%0A    public void test() %7B%0A        try (ScanResult scanResult = new ClassGraph().whitelistPackages(Issue350.class.getPackage().getName())%0A                .enableClassInfo().enableFieldInfo().enableMethodInfo().enableAnnotationInfo().scan()) %7B%0A            assertThat(scanResult.getClassesWithFieldAnnotation(SuperclassAnnotation.class.getName()).getNames())%0A                    .containsExactlyInAnyOrder(Pub.class.getName(), PubSub.class.getName());%0A            assertThat(scanResult.getClassesWithMethodAnnotation(SuperclassAnnotation.class.getName()).getNames())%0A                    .containsExactlyInAnyOrder(Pub.class.getName(), PubSub.class.getName());%0A        %7D%0A        try (ScanResult scanResult = new ClassGraph().whitelistPackages(Issue350.class.getPackage().getName())%0A                .enableClassInfo().enableFieldInfo().enableMethodInfo().enableAnnotationInfo()%0A                .ignoreFieldVisibility().ignoreMethodVisibility().scan()) %7B%0A            assertThat(scanResult.getClassesWithFieldAnnotation(SuperclassAnnotation.class.getName()).getNames())%0A                    .containsExactlyInAnyOrder(Pub.class.getName(), PubSub.class.getName(), Priv.class.getName());%0A            assertThat(scanResult.getClassesWithMethodAnnotation(SuperclassAnnotation.class.getName()).getNames())%0A                    .containsExactlyInAnyOrder(Pub.class.getName(), PubSub.class.getName(), Priv.class.getName());%0A        %7D%0A    %7D%0A%7D%0A

Add unit test for 350