Add a field to the replica class that holds the instance delegator. I.e.
if we're creating a instance replica of {@code java.lang.Long} this
methods adds a new field of type {@code delegator.getClass()} to the
replica class.
330081
private <T> void addDelegatorField(T delegator, final CtClass replicaClass) throws CannotCompileException {
        CtField f = CtField.make(String.format("private %s %s = null;", delegator.getClass().getName(),
                POWERMOCK_INSTANCE_DELEGATOR_FIELD_NAME), replicaClass);
        replicaClass.addField(f);
    }
830288
@GwtIncompatible("Class.getDeclaredFields")
	public ToStringBuilder addAllFields() {
		List<Field> fields = getAllDeclaredFields(instance.getClass());
		for(Field field : fields) {
			addField(field);
		}
		return this;
	}
1098654
public AnnotatedTypeBuilder<X> addToField(AnnotatedField<? super X> field, Annotation annotation) {
       return addToField(field.getJavaMember(), annotation);
   }
1085593
public void addIgnoreFieldAnnotation( Class annotationClass ) {
      if( annotationClass != null && !ignoreFieldAnnotations.contains( annotationClass.getName() )) {
         ignoreFieldAnnotations.add(annotationClass.getName());
      }
   }
626094
public void addListener(BaseListener listener)
    {
        listener.setNextListener(null);  // Just being safe
        if ((this.getRecord() != null) && (this.getRecord().getTable() != null))
            this.getRecord().getTable().addListener((FieldListener)listener, this);   // Give the table a chance to clone this or whatever.
        else
            this.doAddListener((FieldListener)listener);
    }
1027053
def add_field(self, field, **kwargs):
        """"""
        getattr(self, self._private_fields_name).append(field)
        self._expire_cache(reverse=True)
        self._expire_cache(reverse=False)
867240
public <A extends Annotation> A annotation(Class<A> annotationClass) {
        return field.getAnnotation(annotationClass);
    }
1042914
private void maybeAddEnhancedTypeMarkerField() {
    if( getGosuClass() instanceof IGosuEnhancementInternal ) {
      int iModifiers = Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_SYNTHETIC;
      iModifiers |= (BytecodeOptions.isSingleServingLoader() ? Opcodes.ACC_PUBLIC : Opcodes.ACC_PRIVATE);
      IRFieldDecl enhancedTypeMarkerField = new IRFieldDecl( iModifiers,
                                               false,
                                               ENHANCED_TYPE_FIELD,
                                               IRTypeResolver.getDescriptor( ((IGosuEnhancementInternal)getGosuClass()).getEnhancedType() ),
                                               null );
      _irClass.addField( enhancedTypeMarkerField );
    }
  }
900694
private static synchronized void addFieldGetter(FieldGetter fieldGetter, Integer index, boolean addLast) {
		checkParameter(fieldGetter);
		
		LinkedList<FieldGetter> ret = getCurrentFieldGetters();
		if (index != null) {
			ret.add(index, fieldGetter);
		} else {
			if (addLast) {
				ret.addLast(fieldGetter);
			} else {
				ret.addFirst(fieldGetter);
			}
		}
		getters = ret.toArray(new FieldGetter[ret.size()]);
	}
713728
FieldDescriptor getFieldDescriptor(TypeCache.CachedType<?> cachedType, String signature) {
        FieldDescriptor fieldDescriptor = cachedType.getField(signature);
        if (fieldDescriptor == null) {
            fieldDescriptor = scannerContext.getStore().create(FieldDescriptor.class);
            fieldDescriptor.setSignature(signature);
            cachedType.addMember(signature, fieldDescriptor);
        }
        return fieldDescriptor;
    }
1198046
private static void addFields(ClassWriter cw) {
        FieldVisitor fv;

        // -----------------------------------------------------------------------
        // private static final String _type_ids[];
        // -----------------------------------------------------------------------
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, INDENT + "adding field : _type_ids [Ljava/lang/String;");

        fv = cw.visitField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, "_type_ids",
                           "[Ljava/lang/String;", null, null);
        fv.visitEnd();
    }
767581
@NonNull
    public ListenerToken addChangeListener(Executor executor, @NonNull ReplicatorChangeListener listener) {
        if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }

        synchronized (lock) {
            if (listener == null) { throw new IllegalArgumentException(); }
            final ReplicatorChangeListenerToken token = new ReplicatorChangeListenerToken(executor, listener);
            changeListenerTokens.add(token);
            return token;
        }
    }
547643
def _add_dynamic_field_to_instance(self, field, field_name):
        
        # create the new field
        new_field = field._create_dynamic_version()
        new_field.name = field_name
        new_field._attach_to_instance(self)

        # add the field to the list to avoid doing all of this again
        if field_name not in self._fields:  # (maybe already in it via the class)
            if id(self._fields) == id(self.__class__._fields):
                # unlink the list from the class
                self._fields = list(self._fields)
            self._fields.append(field_name)

        # if the field is an hashable field, add it to the list to allow calling
        # hmget on these fields
        if isinstance(field, limpyd_fields.InstanceHashField):
            if id(self._instancehash_fields) == id(self.__class__._instancehash_fields):
                # unlink the link from the class
                self._instancehash_fields = list(self._instancehash_fields)
            self._instancehash_fields.append(field_name)

        # set it as an attribute on the instance, to be reachable
        setattr(self, field_name, new_field)

        return new_field
886297
public void addListener(FieldListener listener, BaseField field)
    {
        super.addListener(listener, field);
        if (listener.getOwner().getRecord() == this.getRecord())   // Only replicate listeners added to base.
        {
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = iterator.next();
                if ((table != null) && (table != this.getNextTable()))
                {
                    BaseField fldInTable = table.getRecord().getField(field.getFieldName());
                    if (fldInTable != null)
                    {
                        FieldListener newBehavior = null; // Clone the file behaviors
                        try   {
                            newBehavior = (FieldListener)listener.clone(fldInTable);  // Clone the file behaviors
                        } catch (CloneNotSupportedException ex)   {
                            newBehavior = null;
                        }
                        if (newBehavior != null)
                            if (newBehavior.getOwner() == null)     // This should have been set, just being careful (ie., next line never called)
                                fldInTable.addListener(newBehavior);        // Add them to the new query
                    }
                }
            }
        }
    }
1073095
def add_field(cls, name, descriptor):
        
        if not isinstance(descriptor, MediaField):
            raise ValueError(
                u'{0} must be an instance of MediaField'.format(descriptor))
        if name in cls.__dict__:
            raise ValueError(
                u'property "{0}" already exists on MediaField'.format(name))
        setattr(cls, name, descriptor)
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;
    }
932490
def add_fields(self, fields):
        
        for field in fields:
            cls = field.__class__
            try:
                container = FieldsContainer.class_container[cls]
            except KeyError:
                raise ValueError('Object of type %s is an invalid field' % cls)
            getattr(self, container).append(field)