private int getLastDefinedComponentOrdinal() {
		if (components.size() == 0) {
			return 0;
		}
		DataTypeComponent dataTypeComponent = components.get(components.size() - 1);
		return dataTypeComponent.getOrdinal();
	}
Replace the specified components with a new component containing the specified data type.
If {@link DataType#DEFAULT} is specified as the resolvedDataType only a clear operation 
is performed.

@param origComponents the original sequence of data type components in this structure 
       to be replaced.  These components must be adjacent components in sequential order.
       If an non-packed undefined component is specified no other component may be included.
@param dataType the data type of the new component
@param newOffset offset of replacement component which must fall within origComponents bounds
@param length the length of the new component
@param fieldName the field name of the new component
@param comment the comment for the new component
@return the new component or null if only a clear operation was performed.
@throws IllegalArgumentException if unable to identify/make sufficient space
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StructureDataType.java