Add a field annotation for an XField.

@param xfield
the XField
@return this object
350244
@Nonnull
    public BugInstance addOptionalField(@CheckForNull XField xfield) {
        if (xfield == null) {
            return this;
        }
        return addField(xfield.getClassName(), xfield.getName(), xfield.getSignature(), xfield.isStatic());
    }
1298986
@SuppressWarnings("unchecked")
  public static void addAnnotation(Field field, Annotation annotation) {
    field.getAnnotation(Annotation.class);// prevent declaredAnnotations haven't initialized
    Map<Class<? extends Annotation>, Annotation> annos;
    try {
      annos = (Map<Class<? extends Annotation>, Annotation>) Field_Field_DeclaredAnnotations.get(field);
    } catch (IllegalAccessException e) {
      throw new IllegalStateException(e);
    }
    if (annos.getClass() == Collections.EMPTY_MAP.getClass()) {
      annos = new HashMap<>();
      try {
        Field_Field_DeclaredAnnotations.set(field, annos);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(e);
      }
    }
    annos.put(annotation.annotationType(), annotation);
  }
624593
public GroupOptions addGroupByField(Field field) {

		Assert.notNull(field, "Field for grouping must not be null.");
		Assert.hasText(field.getName(), "Field.name for grouping must not be null/empty.");
		groupByFields.add(field);
		return this;
	}
550266
@Nonnull
    public BugInstance addField(FieldVariable field) {
        return addField(field.getClassName(), field.getFieldName(), field.getFieldSig(), field.isStatic());
    }
9462
public FieldInfo addField(Modifiers modifiers,
                              String fieldName,
                              TypeDesc type) {
        FieldInfo fi = new FieldInfo(this, modifiers, fieldName, type);
        mFields.add(fi);
        return fi;
    }
781825
public Mapping<T> addFields() {

        if (idColumn == null) {
            throw new RuntimeException("Map ID column before adding class fields");
        }

        for (Field f : ReflectionUtils.getDeclaredFieldsInHierarchy(clazz)) {
            if (!Modifier.isStatic(f.getModifiers())
                    && !isFieldMapped(f.getName())
                    && !ignoredFields.contains(f.getName())) {
                addColumn(f.getName());
            }
        }

        return this;
    }
853945
public static FieldAnnotation fromBCELField(JavaClass jClass, Field field) {
        return new FieldAnnotation(jClass.getClassName(), field.getName(), field.getSignature(), field.isStatic());
    }
991469
def add_field(self, field):
        
        if not isinstance(field, fields.BaseField):
            raise ValueError('Argument "field" must be an instance of '
                             'BaseField')
        self.fields.add(field.name, field)
1113547
public void add(final Field _field)
    {
        this.fields.put(_field.getId(), _field);
        this.fieldName2Field.put(_field.getName(), _field);
        if (_field.getReference() != null && _field.getReference().length() > 0) {
            final String ref = _field.getReference();
            int index;
            int end = 0;
            while ((index = ref.indexOf("$<", end)) > 0) {
                index += 2;
                end = ref.indexOf(">", index);
                addFieldExpr(ref.substring(index, end));
            }
        }
        _field.setCollectionUUID(getUUID());
    }
1085905
public HighlightOptions addField(String fieldname) {
		Assert.hasText(fieldname, "Fieldname must not be null nor empty!");
		return addField(new SimpleField(fieldname));
	}
231335
public void addForeignKeyField(String newField)
    {
        if (m_ForeignKeyFields == null)
        {
            m_ForeignKeyFields = new Vector();
        }
        m_ForeignKeyFields.add(newField);
    }
871967
public static <A extends Annotation> A getAnnotation(Field field, Class<A> annotationType) {
        if (field == null || annotationType == null) {
            return null;
        }

        return field.getAnnotation(annotationType);
    }
1098654
public AnnotatedTypeBuilder<X> addToField(AnnotatedField<? super X> field, Annotation annotation) {
       return addToField(field.getJavaMember(), annotation);
   }
589151
public XTextComponent addTextField(String content, String name, int x,
            int y, int width, int height) throws Exception {
        Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
        XPropertySet textFieldProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, labelModel);
        textFieldProperties.setPropertyValue("PositionX", new Integer(x));
        textFieldProperties.setPropertyValue("PositionY", new Integer(y));
        textFieldProperties.setPropertyValue("Width", new Integer(width));
        textFieldProperties.setPropertyValue("Height", new Integer(height));
        textFieldProperties.setPropertyValue("Name", name);
        textFieldProperties.setPropertyValue("TabIndex", new Short(
                (short) tabcount++));
        textFieldProperties.setPropertyValue("MultiLine", new Boolean(false));
        textFieldProperties.setPropertyValue("Text", content);

        // insert the control models into the dialog model
        this.nameContainer.insertByName(name, labelModel);

        XControlContainer controlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, this.oUnoDialog);
        Object obj = controlContainer.getControl(name);
        XTextComponent field = (XTextComponent) UnoRuntime.queryInterface(
                XTextComponent.class, obj);

        return field;
    }
964080
public IsNullValue markInformationAsComingFromFieldValue(XField field) {
        if (getBaseKind() == NO_KABOOM_NN) {
            return new IsNullValue(kind | FIELD_VAL, locationOfKaBoom);
        }
        return instanceByFlagsList[(getFlags() | FIELD_VAL) >> FLAG_SHIFT][getBaseKind()];
    }
1107734
public <A extends Annotation> boolean hasAnnotation(final Field field, final Class<A> annClass) {
        return getAnnotation(field, annClass) != null;
    }
77335
public WField addField(final WButton button) {
		WField field = new WField((WLabel) null, button);
		add(field);
		return field;
	}