int getElementSize() {
			return elementSize;
		}
Throws exception if the data type does not match the specified {@link AllowedDataTypes}.

@param dt {@link DataType} to check
@param allowedTypes {@link AllowedDataTypes enum} specifying what category of data types are ok
@throws InvalidDataTypeException if dt violates the specified allowedTypes
Ghidra/Features/Base/src/main/java/ghidra/util/data/DataTypeParser.java