Add a Field Write to this class

        :param method:
        :param classobj:
        :param field:
        :return:
517171
def AddFXrefWrite(self, method, classobj, field):
        
        if field not in self._fields:
            self._fields[field] = FieldClassAnalysis(field)
        self._fields[field].AddXrefWrite(classobj, method)
821780
@Override
	public void addField(final SchemaField field) {

		if (field instanceof FieldDefinition) {
			addField((FieldDefinition) field);
		} else if (field instanceof CopyFieldDefinition) {
			addCopyField((CopyFieldDefinition) field);
		}
	}
1184377
def method_missing(method_id, *arguments, &block)
      if method_id.to_s =~ /^get_[\w]+/
        self.class.send :define_method, method_id do
          field = method_id.to_s[4..-1]
          get(field)
        end
        self.send(method_id)
      else
        super
      end
    end
319989
public void writeField(String field) throws IOException {

		if (this.newLine) {
			this.newLine = false;
		} else {
			this.write(',');
		}

		// case 0: empty string, simple :)
		if ((field == null) || (field.length() == 0)) {
			return;
		}

		// case 1: field has quotes in it, if so convert to, quote field and
		// double all quotes
		Matcher matcher = escapePattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.tmpBuffer.setLength(0);
			do {
				matcher.appendReplacement(this.tmpBuffer, "\"\"");
			} while (matcher.find());
			matcher.appendTail(this.tmpBuffer);
			this.write(this.tmpBuffer.toString());
			this.write('"');
			return;
		}

		// case 2: field has a comma, carriage return or new line in it, if so
		// quote field and double all quotes
		matcher = specialCharsPattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.write(field);
			this.write('"');
			return;
		}

		// case 3: safe string to just add
		this.append(field);
	}
482029
def add_parser_from_field(self, name, field_cls):
        """"""
        self.__parser_map__[name] = _field2method(field_cls, method_name=name)
391887
private synchronized void writeObject(final ObjectOutputStream s) throws IOException {
        if ( null != field ) {
            this.object = field.getDeclaringClass();
            this.varName = field.getName();
            this.field = null;
        }
        s.defaultWriteObject();
    }
355762
private void writeFieldBegin(OutputStream result) throws IOException 
    {
        result.write(OPEN_GROUP);
        result.write(FIELD);
        if(fieldDirty) result.write(FIELD_DIRTY);
        if(fieldEdit) result.write(FIELD_EDIT);
        if(fieldLocked) result.write(FIELD_LOCKED);
        if(fieldPrivate) result.write(FIELD_PRIVATE);
    }
681730
private void addStubMethods(TypeSpec.Builder classBuilder, Element member, int methodIndex, MethodSpec.Builder methodBuilder) {
        ExecutableElement executableElement = (ExecutableElement) member;
        String methodName = executableElement.getSimpleName().toString();
        boolean isOneWay = executableElement.getReturnType().getKind() == TypeKind.VOID
                && member.getAnnotation(Oneway.class) != null;


        methodBuilder.beginControlFlow("case TRANSACTION_" + methodName + "_" + methodIndex + ":");

        methodBuilder.addStatement("data.enforceInterface(DESCRIPTOR)");
        List<String> paramNames = new ArrayList<>();
        int paramIndex = 0;
        List<VariableElement> outParams = new ArrayList<>();
        List<String> outParamsNames = new ArrayList<>();

        //pass parameters
        for (VariableElement param : executableElement.getParameters()) {
            ParamBuilder.ParamType paramType = param.getAnnotation(ParamIn.class) != null ? ParamBuilder.ParamType.IN
                    : param.getAnnotation(ParamOut.class) != null ? ParamBuilder.ParamType.OUT : ParamBuilder.ParamType.IN_OUT;

            ParamBuilder paramBuilder = getBindingManager().getBuilderForParam(param.asType());
            if (paramBuilder != null) {
                String paramName = "arg_stb_" + paramIndex;
                paramNames.add(paramName);
                paramBuilder.writeParamsToStub(param, paramType, paramName, methodBuilder);
                if (paramType != ParamBuilder.ParamType.IN) {
                    outParams.add(param);
                    outParamsNames.add(paramName);
                }
            } else {
                logError("Parameter cannot be marshalled " + param.getSimpleName());
            }
            paramIndex++;
        }

        String methodCall = "serviceImpl." + methodName + "(";
        int paramSize = paramNames.size();
        for (int paramCount = 0; paramCount < paramSize; paramCount++) {
            methodCall += paramNames.get(paramCount);
            if (paramCount < paramSize - 1) {
                methodCall += ", ";
            }
        }
        methodCall += ")";

        if (executableElement.getReturnType().getKind() != TypeKind.VOID) {
            methodBuilder.addStatement("$T result = " + methodCall, executableElement.getReturnType());
        } else {
            methodBuilder.addStatement(methodCall);
        }

        if (!isOneWay) {
            methodBuilder.addStatement("reply.writeNoException()");


            if (executableElement.getReturnType().getKind() != TypeKind.VOID) {
                ParamBuilder paramBuilder = getBindingManager().getBuilderForParam(executableElement.getReturnType());
                if (paramBuilder != null) {
                    paramBuilder.readResultsFromStub(executableElement.getReturnType(), methodBuilder);
                } else {
                    logError("Unmarshallable return type " + executableElement.getReturnType());
                }
            }

            int pIndex = 0;
            for (VariableElement param : outParams) {
                ParamBuilder.ParamType paramType = param.getAnnotation(ParamIn.class) != null ? ParamBuilder.ParamType.IN
                        : param.getAnnotation(ParamOut.class) != null ? ParamBuilder.ParamType.OUT : ParamBuilder.ParamType.IN_OUT;
                ParamBuilder paramBuilder = getBindingManager().getBuilderForParam(param.asType());
                if (paramBuilder != null) {
                    paramBuilder.readOutResultsFromStub(param, paramType, outParamsNames.get(pIndex), methodBuilder);
                }
                pIndex++;
            }
        }

        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();
    }
368255
private void writeObjectToField(String fieldname, Object value, Object object, Object alternative)
        throws Exception {
        Object target = object != null ? object : alternative;
        try {
            FieldUtils.writeField(target, fieldname, value, true);
        } catch (Exception e) {
            throw new IllegalArgumentException(String.format("Unable to write value '%s' to field '%s' of object %s",
                value.toString(), fieldname, target.getClass().getName()));
        }
    }
1150084
public static Method getClassFieldWriteMethod(Class<?> clazz, String fieldName) {
		return getClassWriteMethods(clazz).get(fieldName);
	}
990703
def add_fields(self, field_dict):
    
    for key, field in field_dict.items():
      self.add_field(key, field)
596264
public void writeObjectImpl(Object obj)
        throws IOException
    {
        Class cl = obj.getClass();

        try {
            Method method = cl.getMethod("writeReplace", new Class[0]);
            Object repl = method.invoke(obj, new Object[0]);

            writeObject(repl);
            return;
        } catch (Exception e) {
        }

        try {
            writeMapBegin(cl.getName());
            for (; cl != null; cl = cl.getSuperclass()) {
                Field[] fields = cl.getDeclaredFields();
                for (int i = 0; i < fields.length; i++) {
                    Field field = fields[i];

                    if (Modifier.isTransient(field.getModifiers()) ||
                        Modifier.isStatic(field.getModifiers()))
                        continue;

                    // XXX: could parameterize the handler to only deal with public
                    field.setAccessible(true);

                    writeString(field.getName());
                    writeObject(field.get(obj));
                }
            }
            writeMapEnd();
        } catch (IllegalAccessException e) {
            throw new IOExceptionWrapper(e);
        }
    }
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)
550266
@Nonnull
    public BugInstance addField(FieldVariable field) {
        return addField(field.getClassName(), field.getFieldName(), field.getFieldSig(), field.isStatic());
    }
1047335
public HighlightOptions addField(Field field) {
		Assert.notNull(field, "Field must not be null!");
		this.fields.add(field);
		return this;
	}
339334
def write_object(self, obj, parent=None):
        
        # Transform object
        for transformer in self.object_transformers:
            tmp_object = transformer.transform(obj)
            if tmp_object is not obj:
                obj = tmp_object
                break

        self._writeStruct(">B", 1, (self.TC_OBJECT,))
        cls = obj.get_class()
        self.write_classdesc(cls)

        # Add reference
        self.references.append([])
        logging.debug(
            "*** Adding ref 0x%X for object %s",
            len(self.references) - 1 + self.BASE_REFERENCE_IDX,
            obj,
        )

        all_names = collections.deque()
        all_types = collections.deque()
        tmpcls = cls
        while tmpcls:
            all_names.extendleft(reversed(tmpcls.fields_names))
            all_types.extendleft(reversed(tmpcls.fields_types))
            tmpcls = tmpcls.superclass
        del tmpcls

        logging.debug("<=> Field names: %s", all_names)
        logging.debug("<=> Field types: %s", all_types)

        for field_name, field_type in zip(all_names, all_types):
            try:
                logging.debug(
                    "Writing field %s (%s): %s",
                    field_name,
                    field_type,
                    getattr(obj, field_name),
                )
                self._write_value(field_type, getattr(obj, field_name))
            except AttributeError as ex:
                log_error(
                    "No attribute {0} for object {1}\nDir: {2}".format(
                        ex, repr(obj), dir(obj)
                    )
                )
                raise
        del all_names, all_types

        if (
            cls.flags & self.SC_SERIALIZABLE
            and cls.flags & self.SC_WRITE_METHOD
            or cls.flags & self.SC_EXTERNALIZABLE
            and cls.flags & self.SC_BLOCK_DATA
        ):
            for annotation in obj.annotations:
                log_debug(
                    "Write annotation {0} for {1}".format(repr(annotation), repr(obj))
                )
                if annotation is None:
                    self.write_null()
                else:
                    self.writeObject(annotation)
            self._writeStruct(">B", 1, (self.TC_ENDBLOCKDATA,))
37878
def put_field(self, field):
        
        fpath = self.fields_json_path(field)
        # Open fields JSON, locking to prevent other processes
        # reading or writing
        with InterProcessLock(fpath + self.LOCK_SUFFIX, logger=logger):
            try:
                with open(fpath, 'r') as f:
                    dct = json.load(f)
            except IOError as e:
                if e.errno == errno.ENOENT:
                    dct = {}
                else:
                    raise
            if field.array:
                dct[field.name] = list(field.value)
            else:
                dct[field.name] = field.value
            with open(fpath, 'w') as f:
                json.dump(dct, f, indent=2)