public final Reference createStackReference(Instruction instruction, int operandIndex,
			int stackOffset, boolean isWrite) {
		ReferenceManager referenceManager = currentProgram.getReferenceManager();
		RefType type = isWrite ? RefType.WRITE : RefType.READ;
		Reference ref = referenceManager.addStackReference(instruction.getMinAddress(),
			operandIndex, stackOffset, type, SourceType.USER_DEFINED);
		return ref;
	}
Create a stack reference from the given instruction
@param instruction the instruction
@param operandIndex the operand index on the instruction
@param stackOffset the stack offset of the reference
@param isWrite true if the reference is WRITE access or false if the
reference is READ access
@return the newly created stack reference
Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java