@Override
	public void dataTypeReplaced(DataType oldDt, DataType newDt) {
		if (newDt == this || newDt.getLength() < 0) {
			newDt = DataType.DEFAULT;
		}
		if (dataType == oldDt) {
			String oldName = getName();
			int oldLength = getLength();
			int oldAlignment = getAlignment();
			int oldElementLength = getElementLength();
			dataType.removeParent(this);
			dataType = newDt;
			dataType.addParent(this);
			if (dataType.getLength() >= 0) {
				elementLength = dataType.getAlignedLength();
			}
			if (!getName().equals(oldName)) {
				notifyNameChanged(oldName);
			}
			if (getLength() != oldLength || oldElementLength != getElementLength()) {
				notifySizeChanged();
			}
			else if (getAlignment() != oldAlignment) {
				notifyAlignmentChanged();
			}
		}
	}
Validate a array base datatype to ensure that it is allowed
@param baseDt intended base datatype for array (always pass in typedef's base type if applicable)
@throws IllegalArgumentException if dt is not a valid base datatype for an array
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/ArrayDataType.java