class ExtensionVisitor extends ClassVisitor {
    
    private static final Logger log = LoggerFactory.getLogger(ExtensionVisitor.class);

    private static final int ASM_VERSION = Opcodes.ASM7;

    private final ExtensionInfo extensionInfo;

    ExtensionVisitor(ExtensionInfo extensionInfo) {
        super(ASM_VERSION);
        this.extensionInfo = extensionInfo;
    }

    @Override
    public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
        //if (!descriptor.equals("Lorg/pf4j/Extension;")) {
        if (!Type.getType(descriptor).getClassName().equals(Extension.class.getName())) {
            return super.visitAnnotation(descriptor, visible);
        }

        return new AnnotationVisitor(ASM_VERSION) {

            @Override
            public AnnotationVisitor visitArray(final String name) {
                if ("ordinal".equals(name) || "plugins".equals(name) || "points".equals(name)) {
                    return new AnnotationVisitor(ASM_VERSION, super.visitArray(name)) {

                        @Override
                        public void visit(String key, Object value) {<FILL_FUNCTION_BODY>}
                    };
                }

                return super.visitArray(name);
            }

        };
    }

}

                            log.debug("Load annotation attribute {} = {} ({})", name, value, value.getClass().getName());
                            if ("ordinal".equals(name)) {
                                extensionInfo.ordinal = Integer.parseInt(value.toString());
                            } else if ("plugins".equals(name)) {
                                if (value instanceof String) {
                                    log.debug("Found plugin {}", value);
                                    extensionInfo.plugins.add((String) value);
                                } else if (value instanceof String[]) {
                                    log.debug("Found plugins {}", Arrays.toString((String[]) value));
                                    extensionInfo.plugins.addAll(Arrays.asList((String[]) value));
                                } else {
                                    log.debug("Found plugin {}", value.toString());
                                    extensionInfo.plugins.add(value.toString());
                                }
                            } else {
                                String pointClassName = ((Type) value).getClassName();
                                log.debug("Found point " + pointClassName);
                                extensionInfo.points.add(pointClassName);
                            }

                            super.visit(key, value);
                        
<methods>public void <init>(int) ,public void <init>(int, org.objectweb.asm.ClassVisitor) ,public void visit(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) ,public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String, boolean) ,public void visitAttribute(org.objectweb.asm.Attribute) ,public void visitEnd() ,public org.objectweb.asm.FieldVisitor visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object) ,public void visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int) ,public org.objectweb.asm.MethodVisitor visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) ,public org.objectweb.asm.ModuleVisitor visitModule(java.lang.String, int, java.lang.String) ,public void visitNestHost(java.lang.String) ,public void visitNestMember(java.lang.String) ,public void visitOuterClass(java.lang.String, java.lang.String, java.lang.String) ,public void visitPermittedSubclass(java.lang.String) ,public org.objectweb.asm.RecordComponentVisitor visitRecordComponent(java.lang.String, java.lang.String, java.lang.String) ,public void visitSource(java.lang.String, java.lang.String) ,public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation(int, org.objectweb.asm.TypePath, java.lang.String, boolean) <variables>protected final int api,protected org.objectweb.asm.ClassVisitor cv