protected void appendFields(@Nonnull StringBuilder code) throws ExpressionCompileException {
		// Stub out fields / methods
		for (FieldMember field : fields) {
			// Skip stubbing compiler-generated fields.
			if (field.hasBridgeModifier() || field.hasSyntheticModifier())
				continue;

			// Skip enum constants, we added those earlier.
			if (isEnumConst(field))
				continue;

			// Skip stubbing of illegally named fields.
			String name = field.getName();
			if (!isSafeName(name))
				continue;
			NameType fieldNameType = getInfo(name, field.getDescriptor());
			if (!isSafeClassName(fieldNameType.className))
				continue;

			// Skip fields with types that aren't accessible in the workspace.
			if (isMissingType(field.getDescriptor()))
				continue;

			// Append the field. The only modifier that we care about here is if it is static or not.
			if (field.hasStaticModifier())
				code.append("static ");
			code.append(fieldNameType.className).append(' ').append(fieldNameType.name).append(";\n");
		}
	}
Appends all non-enum constant fields to the class.

@param code
		Class code to append the fields to.

@throws ExpressionCompileException
		When the fields could not be stubbed out.
recaf-core/src/main/java/software/coley/recaf/services/compile/stub/ClassStubGenerator.java