public long getLongValueAt(Address address) {

		MemBuffer buf = new DumbMemBufferImpl(currentProgram.getMemory(), address);

		LongDataType longDT = new LongDataType();

		Scalar value =
			(Scalar) longDT.getValue(buf, longDT.getDefaultSettings(), defaultPointerSize);

		return value.getSignedValue();
	}
Method to return the referenced address at the given address
Note: this will work whether there is a created reference or not
@param address the address to look for a referenced address at
@param getIboIf64bit if true, get the address corresponding to the image base offset instead 
of the full reference address
@return the first referenced address from the given address
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/ExtendedFlatProgramAPI.java