private Address getReferenceAddress(CodeUnit cu) {

		Program program = cu.getProgram();

		if (cu instanceof Data) {
			if (((Data) cu).getNumComponents() != 0) {
				return null; // outer composite/array type should ignore reference from component
			}
		}

		ReferenceManager referenceManager = program.getReferenceManager();
		Reference[] referencesFrom = referenceManager.getReferencesFrom(cu.getMinAddress());
		for (Reference reference : referencesFrom) {
			if (reference.isMemoryReference()) {
				return reference.getToAddress();
			}
		}

		return null;
	}
Returns the FactoryField for the given object at index index.
@param varWidth the amount of variable width spacing for any fields
before this one.
@param proxy the object whose properties should be displayed.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/MnemonicFieldFactory.java