    001    package cpw.mods.fml.common.discovery.asm;
    002
    003    import org.objectweb.asm.AnnotationVisitor;
    004    import org.objectweb.asm.FieldVisitor;
    005    import org.objectweb.asm.Opcodes;
    006
    007    public class ModFieldVisitor extends FieldVisitor
    008    {
    009
    010        private String fieldName;
    011        private ASMModParser discoverer;
    012
    013        public ModFieldVisitor(String name, ASMModParser discoverer)
    014        {
    015            super(Opcodes.ASM4);
    016            this.fieldName = name;
    017            this.discoverer = discoverer;
    018        }
    019
    020        @Override
    021        public AnnotationVisitor visitAnnotation(String annotationName, boolean runtimeVisible)
    022        {
    023            discoverer.startFieldAnnotation(fieldName, annotationName);
    024            return new ModAnnotationVisitor(discoverer);
    025        }
    026    }