private boolean matchesType(DecompilerVariable var, DataType dt) {

		String indent = "\t\t\t\t";

		if (var == null) {
			DtrfDbg.println(this, indent + "Types Match? no variable to check");
			return false;
		}

		DataType varType = var.getDataType();
		if (varType == null) {
			// it seems odd to me that there is no type, but I have seen this in the case
			// statement of a switch
			DtrfDbg.println(this, indent + "ypes Match? no variable TYPE to check");
			return false;
		}
		boolean matches = isEqual(varType, dt);
		return matches;
	}
A class that describes Decompiler variables and the fields that they may access.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/extension/datatype/finder/VariableAccessDR.java