@Override
        public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
            String annotationClassName = Type.getType(descriptor).getClassName();
            if (ProductionTest.class.getName().equals(annotationClassName)) {
                productionTests.add(className);
            } else if (StagingTest.class.getName().equals(annotationClassName)) {
                stagingTests.add(className);
            } else if (StagingSetup.class.getName().equals(annotationClassName)) {
                stagingSetupTests.add(className);
            } else if (SystemTest.class.getName().equals(annotationClassName)) {
                systemTests.add(className);
            }
            return null;
        }
Analyzes test classes and tracks all classes containing hosted Vespa test annotations ({@link ai.vespa.hosted.cd}).

@author bjorncs
vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/TestAnnotationAnalyzer.java