    001package cpw.mods.fml.common.discovery.asm;
    002
    003import org.objectweb.asm.AnnotationVisitor;
    004import org.objectweb.asm.FieldVisitor;
    005import org.objectweb.asm.Opcodes;
    006
    007public 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}