public final Reference createExternalReference(Instruction instruction, int operandIndex,
			String libraryName, String externalLabel, Address externalAddr) throws Exception {

		// Use inferred reference type
		RefType refType = RefType.DATA;
		FlowType flowType = instruction.getFlowType();
		if (flowType.isComputed()) {
			if (flowType.isCall()) {
				refType = RefType.COMPUTED_CALL;
			}
			else if (flowType.isJump()) {
				refType = RefType.COMPUTED_JUMP;
			}
		}
		else if (flowType.isCall()) {
			refType = RefType.UNCONDITIONAL_CALL;
		}
		else if (flowType.isJump()) {
			refType = RefType.UNCONDITIONAL_JUMP;
		}

		return createExternalReference(instruction, operandIndex, libraryName, externalLabel,
			externalAddr, refType);
	}
Creates an external reference from the given instruction.
For instructions with flow, the FlowType will be assumed, otherwise
{@link RefType#DATA} will be assumed.  To specify the appropriate
RefType use the alternate form of this method.
@param instruction the instruction
@param operandIndex the operand index on the instruction
@param libraryName the name of the library being referred
@param externalLabel the name of function in the library being referred
@param externalAddr the address of the function in the library being referred
@return the newly created external reference
@throws Exception if an exception occurs
Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java