Changes the writer to treat the next value as a string name. This is useful for map adapters so
that arbitrary type adapters can use {@link #value} to write a name value.
482055
final void promoteValueToName() throws IOException {
    int context = peekScope();
    if (context != NONEMPTY_OBJECT && context != EMPTY_OBJECT) {
      throw new IllegalStateException("Nesting problem.");
    }
    promoteValueToName = true;
  }
242577
public JsonWriter value(Object value) throws IOException {
      Preconditions.checkArgument(inArray() || writeStack.peek() == JsonTokenType.NAME,
                                  "Expecting an array or a name, but found " + writeStack.peek());
      writeObject(value);
      popIf(JsonTokenType.NAME);
      return this;
   }
313310
public void put(String name, String value) {
    List<String> list = new ArrayList<>();
    list.add(value);
    getMap().put(name, list);
  }
355378
public void setValuesFor(String values, String name) {
        getMapHelper().setValuesForIn(values, name, getCurrentValues());
    }
282247
public void renamedType(String oldName, Class<?> currentValue) {
        if (oldName == null) {
            throw new IllegalArgumentException("oldName must not be null");
        }
        if (currentValue == null) {
            throw new IllegalArgumentException("currentValue must not be null");
        }
        if (oldName.startsWith("java.") || oldName.startsWith("javax.") || oldName.startsWith("org.joda.")) {
            throw new IllegalArgumentException("oldName must not be a java.*, javax.* or org.joda.* type");
        }
        checkNotLocked();
        typeRenames.put(oldName, currentValue);
    }
197061
public JsonWriter writeValue(String value) throws IOException {
        if (!willWriteValue) {
            indent();
        }
        writer.write(escape(value));
        willWriteValue = false;
        return this;
    }
752557
function writeValue(value, fieldSchema) {
        // onBeforeValueSet allows you to cancel the operation.
        // It doesn't work like transform and others that allow you to modify the value because all typecast has already happened.
        // For use-cases where you need to modify the value, you can set a new value in the handler and return false.
        if (this[_privateKey]._options.onBeforeValueSet) {
            if (this[_privateKey]._options.onBeforeValueSet.call(this, value, fieldSchema.name) === false) {
                return;
            }
        }

        // Alias simply copies the value without actually writing it to alias index.
        // Because the value isn't actually set on the alias index, onValueSet isn't fired.
        if (fieldSchema.type === 'alias') {
            this[fieldSchema.index] = value;
            return;
        }

        // Write the value to the inner object.
        this[_privateKey]._obj[fieldSchema.name] = value;

        // onValueSet notifies you after a value has been written.
        if (this[_privateKey]._options.onValueSet) {
            this[_privateKey]._options.onValueSet.call(this, value, fieldSchema.name);
        }
    }
1028130
public void setName(String name) {
        String oldname = this.name;
        this.name = name;
        //TODO Reset the main map
        save(oldname);
    }
42530
public void setName(String value) {

        checkFrozen();
        if (!CmsStringUtil.isValidJavaClassName(value)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_MODULE_NAME_1, value));
        }
        m_name = value;
    }
723151
private static void writeAttribute(String name,
                                       Object value,
                                       PrintWriter writer) {
        if (value != null) {
            String s;
            if (value instanceof String || value instanceof Boolean) {
                // for String/Boolean we can just use toString()
                s = value.toString();
            } else {
                // otherwise its a String[], so space-delimit the values
                String[] tokens = (String[]) value;
                int bufLen = tokens.length - 1;
                for (String token: tokens) bufLen += token.length();
                StringBuffer buf = new StringBuffer(bufLen);
                for (int i = 0; i < tokens.length; i++) {
                    if (i > 0) {
                        buf.append(' ');
                    }
                    buf.append(tokens[i]);
                }
                s = buf.toString();
            }
            writer.print(" " + name + "=\"" + s + "\"");
        }
    }
1080538
public void writeNameValuePair(String name, int value) throws IOException
   {
      internalWriteNameValuePair(name, Integer.toString(value));
   }
916949
public void writeValue (Object value) {
		if (value == null)
			writeValue(value, null, null);
		else
			writeValue(value, value.getClass(), null);
	}
223680
function writeValue(marker, type, value) {
  switch (type) {
    case DATA_TYPES.INTEGER:
      return writeInt(marker, value);

    case DATA_TYPES.ARRAY_START:
      return writeArrayLen(marker, value);

    case DATA_TYPES.STRING:
      return writeString(marker, value);

    default:
      throw new Error('I don\'t know how to write type ' + type);
  }
}
658794
public void setFieldName(final String name)
    {
        if (!isInStruct())
        {
            throw new IllegalStateException("IonWriter.setFieldName() must be called before writing a value into a struct.");
        }
        if (name == null)
        {
            throw new NullPointerException("Null field name is not allowed.");
        }
        final SymbolToken token = intern(name);
        user.setFieldNameSymbol(token);
    }
948924
@Override
  public String generateNextName() {
    String name;
    do {
      name = prefix;
      int i = nameCount;

      if (name.isEmpty()) {
        int pos = i % firstChars.length;
        name = String.valueOf(firstChars[pos].name);
        i /= firstChars.length;
      }

      while (i > 0) {
        i--;
        int pos = i % nonFirstChars.length;
        name += nonFirstChars[pos].name;
        i /= nonFirstChars.length;
      }

      nameCount++;

      // Make sure it's not a JS keyword or reserved name.
    } while (TokenStream.isKeyword(name) || reservedNames.contains(name));

    return name;
  }
136629
@NonNull
    @Override
    public MutableDocument setString(@NonNull String key, String value) {
        return setValue(key, value);
    }
623686
private void writeStringField(String fieldName, Object value) throws IOException
   {
      String val = value.toString();
      if (!val.isEmpty())
      {
         m_writer.writeNameValuePair(fieldName, val);
      }
   }