private AnnotationVisitor visitExportPackage() {
        return new AnnotationVisitor(Opcodes.ASM9) {
            private int major = defaultExportPackageVersion.map(ArtifactVersion::getMajorVersion)
                    .orElse(defaultVersionValue("major"));
            private int minor = defaultExportPackageVersion.map(ArtifactVersion::getMinorVersion)
                    .orElse(defaultVersionValue("minor"));
            private int micro = defaultExportPackageVersion.map(ArtifactVersion::getIncrementalVersion)
                    .orElse(defaultVersionValue("micro"));

            // Default qualifier is the empty string.
            private String qualifier = defaultVersionValue("qualifier");

            @Override
            public void visit(String name, Object value) {
                if (name != null) {
                    switch (name) {
                        case "major" -> major = (int) value;
                        case "minor" -> minor = (int) value;
                        case "micro" -> micro = (int) value;
                        case "qualifier" -> qualifier = (String) value;
                    }
                }
            }

            @Override
            public void visitEnd() {
                exportPackageAnnotation = Optional.of(new ExportPackageAnnotation(major, minor, micro, qualifier));
            }

            @Override
            public void visitEnum(String name, String desc, String value) {
            }

            @Override
            public AnnotationVisitor visitArray(String name) {
                return this;
            }

            @Override
            public AnnotationVisitor visitAnnotation(String name, String desc) {
                return this;
            }
        };
    }
Picks up classes used in class files.

@author Tony Vaagenes
@author ollivir
@author gjoranv
bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/AnalyzeClassVisitor.java