@Override
	public DataType getDataType() {
		ClangFieldToken field = (ClangFieldToken) variable;
		DataType dt = field.getDataType();
		dt = getBaseType(dt);
		if (!(dt instanceof Composite)) {
			Msg.error(this, "Have a field for a type that is not a Composite type");
			return dt;
		}

		int offset = field.getOffset();
		Composite composite = (Composite) dt;
		if (composite instanceof Structure) {
			DataTypeComponent subType = ((Structure) composite).getComponentAt(offset);
			if (subType != null) {
				return subType.getDataType();
			}
		}

		int n = composite.getNumComponents();
		if (offset >= n) {
			// how sure when this condition can happen, but we have seen this in the wild
			return null;
		}
		DataTypeComponent component = composite.getComponent(offset);
		if (component == null) {
			return null; // not sure what else to do
		}
		dt = component.getDataType();
		return dt;
	}
A class that represents access to a Decompiler {@link ClangFieldToken} object.  This is the field
of a variable, denoted by {@link ClangVariableToken}.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/extension/datatype/finder/DecompilerFieldAccess.java