@Override
	public Function getObject() {
		if (function != null) {
			try {
				function.getEntryPoint();
				return function;
			}
			catch (ConcurrentModificationException e) {
			}
		}
		function = null;

		Listing listing = program.getListing();

		if (!locationAddr.equals(functionAddr)) {
			// ensure that inferred function reference is valid
			if (listing.getFunctionAt(locationAddr) != null) {
				return null;
			}
			CodeUnit cu = listing.getCodeUnitAt(locationAddr);
			if (!(cu instanceof Data)) {
				return null;
			}
			Data data = (Data) cu;
			if (!(data.getDataType() instanceof Pointer)) {
				return null;
			}
			Reference ref = data.getPrimaryReference(0);
			if (ref == null || !ref.getToAddress().equals(functionAddr)) {
				return null;
			}
		}

		function = listing.getFunctionAt(functionAddr);
		return function;
	}
Construct a proxy for a function
@param model listing model
@param program the program containing the function
@param locationAddr the listing address at which the function exists or was inferred via reference
@param function the function to proxy
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/proxy/FunctionProxy.java