private int getFunctionSignatureElement(List<FieldElement> elements, Class<?> elementClass,
			int classIndex) {

		int characterCount = 0;
		int classCount = 0;
		for (FieldElement fieldElement : elements) {
			if (fieldElement.getClass() == elementClass) {
				if (classCount == classIndex) {
					return characterCount;
				}
				classCount++;
			}
			characterCount += fieldElement.getText().length();
		}
		return 0;
	}
Constructor
@param model the model that the field belongs to.
@param hlProvider the HightLightProvider.
@param displayOptions the Options for display properties.
@param fieldOptions the Options for field specific properties.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/FunctionSignatureFieldFactory.java