for (int i = 0; i < fields.length; i++)
{
if (introduction.matches(advisor, fields[i]))
{
javassist.bytecode.annotation.Annotation info = AnnotationInfoCreator.createAnnotationInfo(classPool, fields[i].getFieldInfo2().getConstPool(), introduction.getAnnotation());
FieldInfo mi = fields[i].getFieldInfo2();
if (introduction.isInvisible())
{
AnnotationsAttribute invisible = (AnnotationsAttribute) mi.getAttribute(AnnotationsAttribute.invisibleTag);
if (invisible == null)
{
invisible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.invisibleTag);
mi.addAttribute(invisible);
}
changed = true;
invisible.addAnnotation(info);
}
else
{
AnnotationsAttribute visible = (AnnotationsAttribute) mi.getAttribute(AnnotationsAttribute.visibleTag);
if (visible == null)
{
visible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.visibleTag);
mi.addAttribute(visible);
}
changed = true;
visible.addAnnotation(info);
}
}