Function getReferencedFunction(Address address) {
		// maybe we point to another function?
		FunctionManager functionManager = currentProgram.getFunctionManager();
		ReferenceManager referenceManager = currentProgram.getReferenceManager();
		Reference[] references = referenceManager.getReferencesFrom(address);
		for (Reference reference : references) {
			Address toAddress = reference.getToAddress();
			Function toFunction = functionManager.getFunctionAt(toAddress);
			if (toFunction != null) {
				return toFunction;
			}
		}
		return null;
	}
Assuming a function <b>foo</b>, this plugin will show:
 1) all callers of <b>foo</b> 
 2) all functions which reference <b>foo</b>
 3) all callees of <b>foo</b>
 4) all functions referenced by <b>foo</b>.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/calltree/CallTreePlugin.java