@Override
	public void setNameAndCategory(CategoryPath path, String name)
			throws InvalidNameException, DuplicateNameException {
		lock.acquire();
		try {
			checkDeleted();
			DataType dt = dataMgr.getDataType(path, name);
			if (dt != null) {
				if (dt == this) {
					return; // unchanged
				}
				throw new DuplicateNameException(
					"DataType named " + name + " already exists in category " + path.getPath());
			}

			// generate a name that would not cause a duplicate in either the current path
			// or
			// the new path. Use the new name if possible.
			String uniqueName = dataMgr.getTemporaryUniqueName(path, getCategoryPath(), name);
			doSetName(uniqueName);

			// set the path - this is guaranteed to work since we make a name that won't
			// conflict
			doSetCategoryPath(path);

			// now, if necessary, rename it to the desired name - guaranteed to work since
			// we checked before we started changing things.
			if (!uniqueName.equals(name)) {
				doSetName(name);
			}
		}
		finally {
			lock.release();
		}
	}
Set the data in the form of the appropriate Object for this DataType.

@param buf the data buffer.
@param settings the display settings for the current value.
@param length the number of bytes to set the value from.
@param value the new value to set object
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeDB.java