Useful for implementing
{@link Message.Builder#clearField(Descriptors.FieldDescriptor)}.
490611
public void clearField(final FieldDescriptorType descriptor) {
    fields.remove(descriptor);
    if (fields.isEmpty()) {
      hasLazyField = false;
    }
  }
823773
@Nullable
  public static Descriptor getMapValueMessageType(FieldDescriptor mapField) {
    FieldDescriptor valueDesc = mapField.getMessageType().findFieldByName("value");
    if (valueDesc.getType() == FieldDescriptor.Type.MESSAGE) {
      return valueDesc.getMessageType();
    } else {
      return null;
    }
  }
1037292
public void clear() {
        String cantClear = "Unable to clear ";
        String action = "Clearing text in " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to have text cleared";
        try {
            if (isNotPresentDisplayedEnabledInput(action, expected, cantClear)) {
                return;
            }
            WebElement webElement = getWebElement();
            webElement.clear();
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantClear + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Cleared text in " + prettyOutputEnd().trim());
    }
180081
public BuildableType.Builder clear() {
    BuildableType_Builder defaults = new BuildableType.Builder();
    type = defaults.type;
    builderType = defaults.builderType;
    mergeBuilder = defaults.mergeBuilder;
    partialToBuilder = defaults.partialToBuilder;
    builderFactory = defaults.builderFactory;
    suppressUnchecked = defaults.suppressUnchecked;
    _unsetProperties.clear();
    _unsetProperties.addAll(defaults._unsetProperties);
    return (BuildableType.Builder) this;
  }
118759
public void clearSavedFields() {
    append = null;
    tokenToName = new LinkedHashMap<String, Navigation>();
    nameToToken = new LinkedHashMap<String, Navigation>();
    remainingMappings = new ArrayList<Navigation>();
  }
1331585
protected void removeEmptyResourceFields() {

        Set<Component> componentsToRemove = new HashSet<Component>();
        int count = 0;
        Component lastElement = null;

        for (Component c : m_resources) {
            if (c instanceof CmsRemovableFormRow<?>) {
                count++;
                AbstractField<?> field = (AbstractField<?>)((CmsRemovableFormRow)c).getInput();
                String value = (String)(field.getValue());
                if (value.isEmpty()) {
                    componentsToRemove.add(c);
                    lastElement = c;
                }
            }
        }

        //if all fields are empty -> keep one of them to attach validator to
        if (componentsToRemove.size() == count) {
            componentsToRemove.remove(lastElement);
        }

        if (count == 0) {
            addResource("");
        }

        for (Component c : componentsToRemove) {
            m_resources.removeComponent(c);
            m_componentsToValidate.remove(c);
        }
    }
434181
function clearField (index, properties) {
  // Aliased fields reflect values on other fields and do not need to be cleared.
  if (properties.isAlias === true) {
    return
  }

  // If the property value is already not set, there's nothing to do.
  if (typeof this[properties.name] === 'undefined') {
    return
  }

  // In case of object & array, they must be initialized immediately.
  if (properties.type === 'object') {
    if (this[properties.name] !== null && this[properties.name].clear) {
      this[properties.name].clear()
      writeValue.call(this[_privateKey]._this, undefined, properties)
    } else {
      writeValue.call(this[_privateKey]._this, undefined, properties)
    }

    // Native arrays are never used so that toArray can be globally supported.
    // Additionally, other properties such as unique rely on passing through Document.
  } else if (properties.type === 'array') {
    this[properties.name].length = 0

    // Other field types can simply have their value set to undefined.
  } else {
    writeValue.call(this[_privateKey]._this, undefined, properties)
  }
}
1152978
def clear(self):
        
        self._logger.debug("Component handlers are cleared")

        # Clean up everything to avoid stale references, ...
        self._field = None
        self._name = None
        self._logger = None
559672
public void resetFields()
    {
        for (int iFileSeq = 0; ; iFileSeq++)
        {
            FieldList fieldList = this.getFieldList(iFileSeq);
            if (fieldList == null)
                break;
            for (int iFieldSeq = 0; ; iFieldSeq++)
            {
                Converter converter = fieldList.getField(iFieldSeq);
                if (converter == null)
                    break;
                FieldInfo field = converter.getField();
                field.initField(Constants.DISPLAY);   // Init the field and display
            }
        }
    }
796825
public void clear() {
    messages = Collections.emptyList();
    isMessagesListMutable = false;
    if (builders != null) {
      for (SingleFieldBuilder<MType, BType, IType> entry :
          builders) {
        if (entry != null) {
          entry.dispose();
        }
      }
      builders = null;
    }
    onChanged();
    incrementModCounts();
  }
172872
public void clearMessages() {
		MessageModel model = getOrCreateComponentModel();

		if (model.messages != null) {
			model.messages.clear();
		}
	}
868617
public boolean declaresField(Field field) {
        try {
            type.getDeclaredField(field.getName());
            return true;
        }
        catch (NoSuchFieldException e) {
            return false;
        }
    }
753051
public void free()
    {
        m_recMerge = null;
        m_iFieldSeq = -1;
        m_iSecondaryFieldSeq = -1;
        this.fieldName = null;
        this.secondaryFieldName = null;
        super.free();
    }
1277874
private void checkFieldDescriptor(FieldDescriptor field) {
        if (field.getContainingType() != metadata.descriptor) {
            throw new RuntimeException("Wrong FieldDescriptor \"" + field.getFullName() + "\" used in message \""
                    + metadata.descriptor.getFullName());
        }
    }
169728
public <T> void clear(ElementDescriptor<T> property)
	{
		if (mRemove != null)
		{
			mRemove.remove(property);
		}

		if (mSet != null)
		{
			mSet.remove(property);
		}
	}
756702
@Override
    public Object getField(FieldDescriptor field) {
        checkFieldDescriptor(field);
        Object result = field.getNumber() == 1 ? getKey() : getValue();
        // Convert enums to EnumValueDescriptor.
        if (field.getType() == FieldDescriptor.Type.ENUM) {
            result = field.getEnumType().findValueByNumberCreatingIfUnknown((java.lang.Integer) result);
        }
        return result;
    }
1359352
public FluentWebElement clearField() {
        Context ctx = Context.singular(context, "clearField");
        executeAndWrapReThrowIfNeeded(setCurrentElement(new Clear()), ctx, true);
        return new FluentWebElement(delegate, currentElement, ctx, monitor, booleanInsteadOfNotFoundException);
    }